@docx4j/jsonix 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,40 @@
1
+ © 2025 The MITRE Corporation.
2
+ Modifications from version 3.2.0 onward © 2026 Plutext Pty Ltd, licensed under the Apache License, Version 2.0, on the same terms as set out below.
3
+
4
+
5
+ Approved for Public Release; Distribution Unlimited. Case Number 18-3678.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
20
+
21
+ - Redistributions of source code must retain the above copyright/ digital rights legend, this list of conditions and the following Notice.
22
+
23
+ - Redistributions in binary form must reproduce the above copyright copyright/ digital rights legend, this list of conditions and the following Notice in the documentation and/or other materials provided with the distribution.
24
+
25
+ - Neither the name of The MITRE Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
26
+
27
+ MITRE’s licensed products include third-party materials that are subject to open source or free software licenses (“Open Source Materials”). The Open Source Materials are as follows:
28
+
29
+ Jsonix - BSD 2-Clause License - Copyright (c) 2014, Alexey Valikov. Please visit https://github.com/highsource/jsonix/blob/5d0d101f338bcf514bb6249437860e4b4d011cd2/LICENSE for full terms of use.
30
+
31
+ The Open Source Materials are licensed under the terms of the applicable third-party licenses that accompany the Open Source Materials. MITRE’s license does not limit a licensee’s rights under the terms of the Open Source Materials license. MITRE’s license also does not grant licensee rights to the Open Source Materials that supersede the terms and conditions of the Open Source Materials license.
32
+
33
+
34
+ NOTICE
35
+
36
+ MITRE grants permission to reproduce, distribute, modify, and otherwise use this software to the extent permitted by the licensed terms provided in the LICENSE file included with this project.
37
+
38
+ This software was produced by The MITRE Corporation for the U. S. Government under contract. As such the U.S. Government has certain use and data rights in this software. No use other than those granted to the U. S. Government, or to those acting on behalf of the U. S. Government, under these contract arrangements is authorized without the express written permission of The MITRE Corporation.
39
+
40
+ For further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.
package/README.md CHANGED
@@ -119,6 +119,11 @@ const text = context.createMarshaller().marshalString<PurchaseOrderElement>({
119
119
  type usable as a discriminant. It is optional on input; you need not set it when marshalling.
120
120
  * The compiler can also write the mapping as an ES module (`<jsonix:output format="esm"/>` gives `PO.mjs`), and this
121
121
  package has an ES-module entry point, so `import { Jsonix } from '@docx4j/jsonix'` works in Node ESM and bundlers.
122
+ * Node and Node bundlers get an entry with static imports of the DOM dependency (`jsonix.node.mjs`, selected by the
123
+ package's `exports` `node` condition), browsers an entry with none (`jsonix.mjs`); `require()` keeps the UMD. Where
124
+ the runtime cannot detect its environment (workers, sandboxes), `Jsonix.DOM.use({ DOMParser, XMLSerializer,
125
+ DOMImplementation })` supplies the DOM to use. In Node, XML 1.0 text keeps raw U+0085 and U+2028 (xmldom's default
126
+ would turn them into line feeds).
122
127
  * `new Jsonix.Context(mappings, { parentPointers: true })` gives every unmarshalled typed object a non-enumerable
123
128
  `PARENT` pointing at its containing typed object (root objects have none), and `Jsonix.Util.deepCopy(value, parent?)`
124
129
  copies a subtree and re-links the pointers, like docx4j's `-Xparent-pointer` / `-Xdocx4j-copy` model. Generated