├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── dep_build_v2.yml │ ├── dep_build_v3.yml │ └── main.yml ├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .travis.yml ├── LICENSE ├── README.md ├── SECURITY.md ├── docs └── javadoc │ ├── jakarta-jsonp │ ├── 2.13 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jsonp │ │ │ │ ├── JSONPModule.html │ │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ │ ├── JsonPatchDeserializer.html │ │ │ │ ├── JsonValueDeserializer.html │ │ │ │ ├── JsonValueSerializer.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── JSONPModule.html │ │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ │ ├── JsonPatchDeserializer.html │ │ │ │ ├── JsonValueDeserializer.html │ │ │ │ ├── JsonValueSerializer.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ └── 2.14 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsonp │ │ │ ├── JSONPModule.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── JSONPModule.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── jakarta-mail │ ├── 2.13 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jakarta │ │ │ │ └── mail │ │ │ │ ├── JakartaInternetAddressDeserializer.html │ │ │ │ ├── JakartaInternetAddressSerializer.html │ │ │ │ ├── JakartaMailModule.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── JakartaInternetAddressDeserializer.html │ │ │ │ ├── JakartaInternetAddressSerializer.html │ │ │ │ ├── JakartaMailModule.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ └── 2.14 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jakarta │ │ │ └── mail │ │ │ ├── JakartaInternetAddressDeserializer.html │ │ │ ├── JakartaInternetAddressSerializer.html │ │ │ ├── JakartaMailModule.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── JakartaInternetAddressDeserializer.html │ │ │ ├── JakartaInternetAddressSerializer.html │ │ │ ├── JakartaMailModule.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── joda-money │ ├── 2.11 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jodamoney │ │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ │ ├── CurrencyUnitSerializer.html │ │ │ │ ├── JodaMoneyModule.html │ │ │ │ ├── MoneyDeserializer.html │ │ │ │ ├── MoneySerializer.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ │ ├── CurrencyUnitSerializer.html │ │ │ │ ├── JodaMoneyModule.html │ │ │ │ ├── MoneyDeserializer.html │ │ │ │ ├── MoneySerializer.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── 2.12 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jodamoney │ │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ │ ├── CurrencyUnitSerializer.html │ │ │ │ ├── JodaMoneyModule.html │ │ │ │ ├── MoneyDeserializer.html │ │ │ │ ├── MoneySerializer.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ │ ├── CurrencyUnitSerializer.html │ │ │ │ ├── JodaMoneyModule.html │ │ │ │ ├── MoneyDeserializer.html │ │ │ │ ├── MoneySerializer.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── 2.13 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jodamoney │ │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ │ ├── CurrencyUnitSerializer.html │ │ │ │ ├── JodaMoneyModule.html │ │ │ │ ├── MoneyDeserializer.html │ │ │ │ ├── MoneySerializer.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ │ ├── CurrencyUnitSerializer.html │ │ │ │ ├── JodaMoneyModule.html │ │ │ │ ├── MoneyDeserializer.html │ │ │ │ ├── MoneySerializer.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ └── 2.14 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jodamoney │ │ │ ├── AmountRepresentation.html │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ ├── CurrencyUnitSerializer.html │ │ │ ├── JodaMoneyModule.html │ │ │ ├── MoneyDeserializer.html │ │ │ ├── MoneySerializer.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── AmountRepresentation.html │ │ │ ├── CurrencyUnitDeserializer.html │ │ │ ├── CurrencyUnitSerializer.html │ │ │ ├── JodaMoneyModule.html │ │ │ ├── MoneyDeserializer.html │ │ │ ├── MoneySerializer.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── json-org │ ├── 2.11 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jsonorg │ │ │ │ ├── JSONArrayDeserializer.html │ │ │ │ ├── JSONArraySerializer.html │ │ │ │ ├── JSONObjectDeserializer.html │ │ │ │ ├── JSONObjectSerializer.html │ │ │ │ ├── JsonOrgModule.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── JSONArrayDeserializer.html │ │ │ │ ├── JSONArraySerializer.html │ │ │ │ ├── JSONObjectDeserializer.html │ │ │ │ ├── JSONObjectSerializer.html │ │ │ │ ├── JsonOrgModule.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── 2.12 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jsonorg │ │ │ │ ├── JSONArrayDeserializer.html │ │ │ │ ├── JSONArraySerializer.html │ │ │ │ ├── JSONObjectDeserializer.html │ │ │ │ ├── JSONObjectSerializer.html │ │ │ │ ├── JsonOrgModule.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── JSONArrayDeserializer.html │ │ │ │ ├── JSONArraySerializer.html │ │ │ │ ├── JSONObjectDeserializer.html │ │ │ │ ├── JSONObjectSerializer.html │ │ │ │ ├── JsonOrgModule.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── 2.13 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── fasterxml │ │ │ │ └── jackson │ │ │ │ └── datatype │ │ │ │ └── jsonorg │ │ │ │ ├── JSONArrayDeserializer.html │ │ │ │ ├── JSONArraySerializer.html │ │ │ │ ├── JSONObjectDeserializer.html │ │ │ │ ├── JSONObjectSerializer.html │ │ │ │ ├── JsonOrgModule.html │ │ │ │ ├── PackageVersion.html │ │ │ │ ├── class-use │ │ │ │ ├── JSONArrayDeserializer.html │ │ │ │ ├── JSONArraySerializer.html │ │ │ │ ├── JSONObjectDeserializer.html │ │ │ │ ├── JSONObjectSerializer.html │ │ │ │ ├── JsonOrgModule.html │ │ │ │ └── PackageVersion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ └── 2.14 │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsonorg │ │ │ ├── JSONArrayDeserializer.html │ │ │ ├── JSONArraySerializer.html │ │ │ ├── JSONObjectDeserializer.html │ │ │ ├── JSONObjectSerializer.html │ │ │ ├── JsonOrgModule.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── JSONArrayDeserializer.html │ │ │ ├── JSONArraySerializer.html │ │ │ ├── JSONObjectDeserializer.html │ │ │ ├── JSONObjectSerializer.html │ │ │ ├── JsonOrgModule.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ └── jsr-353 │ ├── 2.11 │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsr353 │ │ │ ├── JSR353Module.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── JSR353Module.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ ├── constant-values.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-all.html │ ├── index.html │ ├── overview-tree.html │ ├── package-list │ ├── script.js │ ├── serialized-form.html │ └── stylesheet.css │ ├── 2.12 │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsr353 │ │ │ ├── JSR353Module.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── JSR353Module.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ ├── constant-values.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-all.html │ ├── index.html │ ├── overview-tree.html │ ├── package-list │ ├── script.js │ ├── serialized-form.html │ └── stylesheet.css │ ├── 2.13 │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── com │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsr353 │ │ │ ├── JSR353Module.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ ├── PackageVersion.html │ │ │ ├── class-use │ │ │ ├── JSR353Module.html │ │ │ ├── JsonMergePatchDeserializer.html │ │ │ ├── JsonPatchDeserializer.html │ │ │ ├── JsonValueDeserializer.html │ │ │ ├── JsonValueSerializer.html │ │ │ └── PackageVersion.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ ├── constant-values.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-all.html │ ├── index.html │ ├── overview-tree.html │ ├── package-list │ ├── script.js │ ├── serialized-form.html │ └── stylesheet.css │ └── 2.14 │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── com │ └── fasterxml │ │ └── jackson │ │ └── datatype │ │ └── jsr353 │ │ ├── JSR353Module.html │ │ ├── JsonMergePatchDeserializer.html │ │ ├── JsonPatchDeserializer.html │ │ ├── JsonValueDeserializer.html │ │ ├── JsonValueSerializer.html │ │ ├── PackageVersion.html │ │ ├── class-use │ │ ├── JSR353Module.html │ │ ├── JsonMergePatchDeserializer.html │ │ ├── JsonPatchDeserializer.html │ │ ├── JsonValueDeserializer.html │ │ ├── JsonValueSerializer.html │ │ └── PackageVersion.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ ├── constant-values.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-all.html │ ├── index.html │ ├── overview-tree.html │ ├── package-list │ ├── script.js │ ├── serialized-form.html │ └── stylesheet.css ├── jakarta-jsonp ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsonp │ │ │ ├── JSONPModule.java │ │ │ ├── JsonMergePatchDeserializer.java │ │ │ ├── JsonPatchDeserializer.java │ │ │ ├── JsonValueDeserializer.java │ │ │ ├── JsonValueSerializer.java │ │ │ └── PackageVersion.java.in │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── jsonp │ ├── DeserViaCreatorTest.java │ ├── JsonMergePatchDeserializationTest.java │ ├── JsonMergePatchSerializationTest.java │ ├── JsonPatchDeserializationTest.java │ ├── JsonPatchSerializationTest.java │ ├── JsonValueDeserializationTest.java │ ├── JsonValueSerializationTest.java │ ├── ModuleSPIMetadataTest.java │ ├── PolymorphicTest.java │ ├── TestBase.java │ └── TestVersions.java ├── jakarta-mail ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jakarta │ │ │ └── mail │ │ │ ├── JakartaInternetAddressDeserializer.java │ │ │ ├── JakartaInternetAddressSerializer.java │ │ │ ├── JakartaMailModule.java │ │ │ └── PackageVersion.java.in │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── jakarta │ └── mail │ ├── ModuleSPIMetadataTest.java │ ├── SerDesTests.java │ ├── TestBase.java │ └── VersionTest.java ├── javax-money ├── MONEY.md ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── javax │ │ │ └── money │ │ │ ├── AmountWriter.java │ │ │ ├── BigDecimalAmountWriter.java │ │ │ ├── CurrencyUnitDeserializer.java │ │ │ ├── CurrencyUnitSerializer.java │ │ │ ├── DecimalAmountWriter.java │ │ │ ├── FieldNames.java │ │ │ ├── JavaxMoneyModule.java │ │ │ ├── MonetaryAmountDeserializer.java │ │ │ ├── MonetaryAmountFactory.java │ │ │ ├── MonetaryAmountFormatFactory.java │ │ │ ├── MonetaryAmountSerializer.java │ │ │ ├── PackageVersion.java.in │ │ │ └── QuotedDecimalAmountWriter.java │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── javax │ └── money │ ├── CurrencyUnitDeserializerTest.java │ ├── CurrencyUnitSchemaSerializerTest.java │ ├── CurrencyUnitSerializerTest.java │ ├── FieldNamesTest.java │ ├── ModuleSPIMetadataTest.java │ ├── MonetaryAmountDeserializerTest.java │ ├── MonetaryAmountSchemaSerializerTest.java │ ├── MonetaryAmountSerializerTest.java │ └── SchemaTestClass.java ├── joda-money ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jodamoney │ │ │ ├── AmountConverter.java │ │ │ ├── AmountRepresentation.java │ │ │ ├── CurrencyUnitDeserializer.java │ │ │ ├── CurrencyUnitSerializer.java │ │ │ ├── DecimalNumberAmountConverter.java │ │ │ ├── DecimalStringAmountConverter.java │ │ │ ├── JodaMoneyModule.java │ │ │ ├── JodaMoneySerializerBase.java │ │ │ ├── MinorCurrencyUnitAmountConverter.java │ │ │ ├── MoneyDeserializer.java │ │ │ ├── MoneySerializer.java │ │ │ └── PackageVersion.java.in │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── jodamoney │ ├── CurrencyUnitDeserializerTest.java │ ├── CurrencyUnitSerializerTest.java │ ├── ModuleSPIMetadataTest.java │ ├── ModuleTestBase.java │ ├── MoneyDeserializerTest.java │ ├── MoneySerializerTest.java │ ├── PolymorphicHandlingTest.java │ └── TestVersions.java ├── json-org ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsonorg │ │ │ ├── JSONArrayDeserializer.java │ │ │ ├── JSONArraySerializer.java │ │ │ ├── JSONBaseSerializer.java │ │ │ ├── JSONObjectDeserializer.java │ │ │ ├── JSONObjectSerializer.java │ │ │ ├── JsonOrgModule.java │ │ │ ├── PackageVersion.java.in │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── jsonorg │ ├── ConvertTest.java │ ├── ModuleSPIMetadataTest.java │ ├── ModuleTestBase.java │ ├── SimpleReadTest.java │ ├── SimpleWriteTest.java │ ├── TestVersions.java │ └── TypeInformationTest.java ├── jsr-353 ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── jsr353 │ │ │ ├── JSR353Module.java │ │ │ ├── JsonMergePatchDeserializer.java │ │ │ ├── JsonPatchDeserializer.java │ │ │ ├── JsonValueDeserializer.java │ │ │ ├── JsonValueSerializer.java │ │ │ └── PackageVersion.java.in │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── jsr353 │ ├── DeserViaCreatorTest.java │ ├── JsonMergePatchDeserializationTest.java │ ├── JsonMergePatchSerializationTest.java │ ├── JsonPatchDeserializationTest.java │ ├── JsonPatchSerializationTest.java │ ├── JsonValueDeserializationTest.java │ ├── JsonValueSerializationTest.java │ ├── ModuleSPIMetadataTest.java │ ├── PolymorphicTest.java │ ├── TestBase.java │ └── TestVersions.java ├── moneta ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fasterxml │ │ │ └── jackson │ │ │ └── datatype │ │ │ └── moneta │ │ │ ├── MonetaMoneyModule.java │ │ │ └── PackageVersion.java.in │ └── resources │ │ └── META-INF │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── services │ │ └── com.fasterxml.jackson.databind.Module │ ├── moditect │ └── module-info.java │ └── test │ └── java │ └── com │ └── fasterxml │ └── jackson │ └── datatype │ └── moneta │ ├── CurrencyUnitDeserializerTest.java │ ├── CurrencyUnitSchemaSerializerTest.java │ ├── CurrencyUnitSerializerTest.java │ ├── ModuleSPIMetadataTest.java │ ├── MonetaryAmountDeserializerTest.java │ ├── MonetaryAmountSchemaSerializerTest.java │ ├── MonetaryAmountSerializerTest.java │ └── SchemaTestClass.java ├── mvnw ├── mvnw.cmd ├── pom.xml └── release-notes ├── CREDITS-2.x └── VERSION-2.x /.gitattributes: -------------------------------------------------------------------------------- 1 | # Do not merge `pom.xml` from older version, as it will typically conflict 2 | 3 | pom.xml merge=ours 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | groups: 8 | github-actions: 9 | patterns: 10 | - "*" 11 | -------------------------------------------------------------------------------- /.github/workflows/dep_build_v2.yml: -------------------------------------------------------------------------------- 1 | name: Re-build on jackson-databind v2 push 2 | on: 3 | repository_dispatch: 4 | types: [jackson-databind-pushed] 5 | # just for testing 6 | workflow_dispatch: 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | # Do we want wide matrix build? For now, limited 14 | runs-on: ubuntu-latest 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | java_version: ['8', '17', '21'] 19 | env: 20 | JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" 21 | steps: 22 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 23 | with: 24 | ref: 2.x 25 | - name: Set up JDK 26 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 27 | with: 28 | distribution: 'temurin' 29 | java-version: ${{ matrix.java_version }} 30 | cache: 'maven' 31 | - name: Build and test 32 | run: ./mvnw -B -ff -ntp clean verify 33 | 34 | # No recursive rebuild (yet?) 35 | -------------------------------------------------------------------------------- /.github/workflows/dep_build_v3.yml: -------------------------------------------------------------------------------- 1 | name: Re-build on jackson-databind v3 push 2 | on: 3 | repository_dispatch: 4 | types: [jackson-databind-pushed-v3] 5 | # just for testing 6 | workflow_dispatch: 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | # Do we want wide matrix build? For now, limited 14 | runs-on: 'ubuntu-22.04' 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | java_version: ['17', '21'] 19 | env: 20 | JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" 21 | steps: 22 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 23 | with: 24 | ref: 3.x 25 | - name: Set up JDK 26 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 27 | with: 28 | distribution: 'temurin' 29 | java-version: ${{ matrix.java_version }} 30 | cache: 'maven' 31 | - name: Build and test 32 | run: ./mvnw -B -ff -ntp clean verify 33 | 34 | # No recursive rebuild (yet?) 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # use glob syntax. 2 | syntax: glob 3 | *.class 4 | *~ 5 | *.bak 6 | *.off 7 | *.old 8 | .DS_Store 9 | 10 | # building 11 | target 12 | 13 | # Eclipse 14 | .classpath 15 | .project 16 | .settings 17 | 18 | # IDEA 19 | *.iml 20 | *.ipr 21 | *.iws 22 | .idea/ 23 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FasterXML/jackson-datatypes-misc/c01773822a12edc173e1c5660d030129bd52b355/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | git: 4 | quiet: true 5 | submodules: false 6 | 7 | jdk: 8 | - openjdk8 9 | - openjdk11 10 | 11 | branches: 12 | only: 13 | - "2.13" 14 | 15 | script: mvn -B clean verify 16 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Last Updated: 2019-11-26 4 | 5 | ## Supported Versions 6 | 7 | Current status of open branches, with new releases, can be found from [Jackson Releases](https://github.com/FasterXML/jackson/wiki/Jackson-Releases) 8 | wiki page 9 | 10 | ## Reporting a Vulnerability 11 | 12 | The recommended mechanism for reporting possible security vulnerabilities follows 13 | so-called "Coordinated Disclosure Plan" (see [definition of DCP](https://vuls.cert.org/confluence/display/Wiki/Coordinated+Vulnerability+Disclosure+Guidance) 14 | for general idea). The first step is to file a [Tidelift security contact](https://tidelift.com/security): 15 | Tidelift will route all reports via their system to maintainers of relevant package(s), and start the 16 | process that will evaluate concern and issue possible fixes, send update notices and so on. 17 | Note that you do not need to be a Tidelift subscriber to file a security contact. 18 | 19 | Alternatively you may also report possible vulnerabilities to `info` at fasterxml dot com 20 | mailing address. Note that filing an issue to go with report is fine, but if you do that please 21 | DO NOT include details of security problem in the issue but only in email contact. 22 | This is important to give us time to provide a patch, if necessary, for the problem. 23 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.13/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: JSON-P (Jakarta) 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.13/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: JSON-P (Jakarta) 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.13/com/fasterxml/jackson/datatype/jsonp/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsonp (Jackson datatype: JSON-P (Jakarta) 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsonp

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.13/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonp 2 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.13/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.14/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: JSON-P (Jakarta) 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.14/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: JSON-P (Jakarta) 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.14/com/fasterxml/jackson/datatype/jsonp/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsonp (Jackson datatype: JSON-P (Jakarta) 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

com.fasterxml.jackson.datatype.jsonp

13 |
14 |

Classes

15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.14/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonp 2 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-jsonp/2.14/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.13/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: Jakarta Mail 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.13/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: Jakarta Mail 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.13/com/fasterxml/jackson/datatype/jakarta/mail/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jakarta.mail (Jackson datatype: Jakarta Mail 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jakarta.mail

14 |
15 |

Classes

16 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.13/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jakarta.mail 2 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.13/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.14/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: Jakarta Mail 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.14/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: Jakarta Mail 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.14/com/fasterxml/jackson/datatype/jakarta/mail/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jakarta.mail (Jackson datatype: Jakarta Mail 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

com.fasterxml.jackson.datatype.jakarta.mail

13 |
14 |

Classes

15 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.14/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jakarta.mail 2 | -------------------------------------------------------------------------------- /docs/javadoc/jakarta-mail/2.14/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.11/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.11/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.11/com/fasterxml/jackson/datatype/jodamoney/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jodamoney (Jackson datatype: joda-money 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jodamoney

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.11/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jodamoney 2 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.11/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.12/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.12/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.12/com/fasterxml/jackson/datatype/jodamoney/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jodamoney (Jackson datatype: joda-money 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jodamoney

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.12/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jodamoney 2 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.12/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.13/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.13/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.13/com/fasterxml/jackson/datatype/jodamoney/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jodamoney (Jackson datatype: joda-money 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jodamoney

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.13/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jodamoney 2 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.13/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.14/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.14/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: joda-money 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.14/com/fasterxml/jackson/datatype/jodamoney/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jodamoney (Jackson datatype: joda-money 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

com.fasterxml.jackson.datatype.jodamoney

13 |
14 |

Classes

15 | 23 |

Enums

24 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.14/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jodamoney 2 | -------------------------------------------------------------------------------- /docs/javadoc/joda-money/2.14/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.11/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.11/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.11/com/fasterxml/jackson/datatype/jsonorg/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsonorg (Jackson datatype: org.json 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsonorg

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.11/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonorg 2 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.11/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.12/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.12/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.12/com/fasterxml/jackson/datatype/jsonorg/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsonorg (Jackson datatype: org.json 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsonorg

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.12/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonorg 2 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.12/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.13/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.13/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.13/com/fasterxml/jackson/datatype/jsonorg/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsonorg (Jackson datatype: org.json 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsonorg

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.13/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonorg 2 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.13/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.14/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.14/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: org.json 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.14/com/fasterxml/jackson/datatype/jsonorg/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsonorg (Jackson datatype: org.json 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

com.fasterxml.jackson.datatype.jsonorg

13 |
14 |

Classes

15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.14/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonorg 2 | -------------------------------------------------------------------------------- /docs/javadoc/json-org/2.14/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.11/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.11/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.11/com/fasterxml/jackson/datatype/jsr353/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsr353 (Jackson datatype: jsr-353 2.11.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsr353

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.11/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsr353 2 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.11/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.12/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.12/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.12/com/fasterxml/jackson/datatype/jsr353/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsr353 (Jackson datatype: jsr-353 2.12.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsr353

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.12/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsr353 2 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.12/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.13/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.13/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

All Classes

14 |
15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.13/com/fasterxml/jackson/datatype/jsr353/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsr353 (Jackson datatype: jsr-353 2.13.0 API) 8 | 9 | 10 | 11 | 12 | 13 |

com.fasterxml.jackson.datatype.jsr353

14 |
15 |

Classes

16 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.13/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsr353 2 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.13/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.14/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.14/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Jackson datatype: jsr-353 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.14/com/fasterxml/jackson/datatype/jsr353/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.fasterxml.jackson.datatype.jsr353 (Jackson datatype: jsr-353 2.14.0 API) 8 | 9 | 10 | 11 | 12 |

com.fasterxml.jackson.datatype.jsr353

13 |
14 |

Classes

15 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.14/package-list: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsr353 2 | -------------------------------------------------------------------------------- /docs/javadoc/jsr-353/2.14/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/main/java/com/fasterxml/jackson/datatype/jsonp/JsonMergePatchDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonParser; 6 | 7 | import com.fasterxml.jackson.databind.DeserializationContext; 8 | import com.fasterxml.jackson.databind.deser.std.StdDeserializer; 9 | import com.fasterxml.jackson.databind.type.LogicalType; 10 | 11 | import jakarta.json.Json; 12 | import jakarta.json.JsonMergePatch; 13 | 14 | public class JsonMergePatchDeserializer extends StdDeserializer 15 | { 16 | private static final long serialVersionUID = 1L; 17 | 18 | protected final JsonValueDeserializer jsonValueDeser; 19 | 20 | public JsonMergePatchDeserializer(JsonValueDeserializer jsonValueDeser) { 21 | super(JsonMergePatch.class); 22 | this.jsonValueDeser = jsonValueDeser; 23 | } 24 | 25 | @Override 26 | public LogicalType logicalType() { 27 | return jsonValueDeser.logicalType(); 28 | } 29 | 30 | @Override 31 | public JsonMergePatch deserialize(JsonParser p, DeserializationContext ctxt) 32 | throws IOException 33 | { 34 | return Json.createMergePatch(jsonValueDeser.deserialize(p, ctxt)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/main/java/com/fasterxml/jackson/datatype/jsonp/JsonPatchDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonParser; 6 | import com.fasterxml.jackson.databind.DeserializationContext; 7 | import com.fasterxml.jackson.databind.deser.std.StdDeserializer; 8 | import com.fasterxml.jackson.databind.type.LogicalType; 9 | 10 | import jakarta.json.JsonPatch; 11 | import jakarta.json.spi.JsonProvider; 12 | 13 | public class JsonPatchDeserializer extends StdDeserializer 14 | { 15 | private static final long serialVersionUID = 1L; 16 | 17 | protected final JsonValueDeserializer jsonValueDeser; 18 | 19 | public JsonPatchDeserializer(JsonValueDeserializer jsonValueDeser) { 20 | super(JsonPatch.class); 21 | this.jsonValueDeser = jsonValueDeser; 22 | } 23 | 24 | @Override 25 | public LogicalType logicalType() { 26 | return jsonValueDeser.logicalType(); 27 | } 28 | 29 | @Override 30 | public JsonPatch deserialize(JsonParser p, DeserializationContext ctxt) 31 | throws IOException 32 | { 33 | return provider.createPatch(jsonValueDeser._deserializeArray(p, ctxt)); 34 | } 35 | 36 | private final static JsonProvider provider = JsonProvider.provider(); 37 | } 38 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/main/java/com/fasterxml/jackson/datatype/jsonp/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | This copy of Jackson Jakarta JSONP extension module is licensed under the 2 | Apache (Software) License, version 2.0 ("the License"). 3 | See the License for details about distribution rights, and the 4 | specific rights regarding derivative works. 5 | 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonp.JSONPModule 2 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | // Copied+modified from jsr-353 ones on 04-Mar-2021 2 | module com.fasterxml.jackson.datatype.jsonp { 3 | requires com.fasterxml.jackson.core; 4 | requires com.fasterxml.jackson.databind; 5 | 6 | requires jakarta.json; 7 | 8 | exports com.fasterxml.jackson.datatype.jsonp; 9 | 10 | provides com.fasterxml.jackson.databind.Module with 11 | com.fasterxml.jackson.datatype.jsonp.JSONPModule; 12 | } 13 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/DeserViaCreatorTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import jakarta.json.JsonObject; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.fasterxml.jackson.annotation.JsonCreator; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | import com.fasterxml.jackson.databind.ObjectMapper; 10 | 11 | import static org.junit.jupiter.api.Assertions.*; 12 | 13 | public class DeserViaCreatorTest extends TestBase 14 | { 15 | static class Pojo { 16 | String text; 17 | JsonObject object; 18 | 19 | @JsonCreator 20 | public Pojo(@JsonProperty("s") String s, @JsonProperty("o") JsonObject o) { 21 | text = s; 22 | object = o; 23 | } 24 | } 25 | 26 | @Test 27 | public void testCreatorDeser() throws Exception 28 | { 29 | final ObjectMapper mapper = sharedMapper(); 30 | Pojo p = mapper.readerFor(Pojo.class) 31 | .readValue( "{\"s\": \"String\", \"o\": { \"a\": 1, \"b\": \"2\" } }"); 32 | assertNotNull(p); 33 | assertNotNull(p.object); 34 | 35 | p = mapper.readerFor(Pojo.class).readValue("{\"s\": \"String\"}"); 36 | assertNotNull(p); 37 | // has to remain `null` as JsonValue.NULL is not JsonObject 38 | assertNull(p.object); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/JsonMergePatchSerializationTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | 5 | import jakarta.json.JsonMergePatch; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class JsonMergePatchSerializationTest extends TestBase 12 | { 13 | private static final ObjectMapper MAPPER = newMapper(); 14 | 15 | @Test 16 | public void testSimpleSerialization() throws Exception 17 | { 18 | // First need a patch so deserialization must work 19 | final String input = "{" + 20 | "\"name\":\"Json\"" + 21 | "}"; 22 | final JsonMergePatch patch1 = MAPPER.readValue(input, JsonMergePatch.class); 23 | final String output = MAPPER.writeValueAsString(patch1); 24 | 25 | // and read back 26 | final JsonMergePatch patch2 = MAPPER.readValue(output, JsonMergePatch.class); 27 | assertEquals(patch1.toJsonValue(), patch2.toJsonValue()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/JsonPatchSerializationTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | 5 | import jakarta.json.JsonPatch; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class JsonPatchSerializationTest extends TestBase 12 | { 13 | private static final ObjectMapper MAPPER = newMapper(); 14 | 15 | @Test 16 | public void testSimpleSerialization() throws Exception 17 | { 18 | // First need a patch so deserialization must work 19 | final String input = "[" + 20 | "{" + 21 | "\"op\":\"replace\"," + 22 | "\"path\":\"/name\"," + 23 | "\"value\":\"Json\"" + 24 | "}" + 25 | "]"; 26 | final JsonPatch jsonPatch = MAPPER.readValue(input, JsonPatch.class); 27 | final String output = MAPPER.writeValueAsString(jsonPatch); 28 | 29 | // and read back 30 | final JsonPatch jsonPatch2 = MAPPER.readValue(output, JsonPatch.class); 31 | assertEquals(jsonPatch, jsonPatch2); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/JsonValueSerializationTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import jakarta.json.*; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class JsonValueSerializationTest extends TestBase 12 | { 13 | @Test 14 | public void testSimpleArray() throws Exception 15 | { 16 | JsonArray arr = arrayBuilder() 17 | .add(true) 18 | .addNull() 19 | .add(123) 20 | .add(new BigDecimal("15.25")) 21 | .build(); 22 | assertEquals("[true,null,123,15.25]", serializeAsString(arr)); 23 | } 24 | 25 | @Test 26 | public void testNestedArray() throws Exception 27 | { 28 | JsonArray arr = arrayBuilder() 29 | .add(1) 30 | .add(arrayBuilder().add(false).add(45).build()) 31 | .add(objectBuilder().add("foo", 13).build()) 32 | .build(); 33 | assertEquals("[1,[false,45],{\"foo\":13}]", serializeAsString(arr)); 34 | } 35 | 36 | @Test 37 | public void testSimpleObject() throws Exception 38 | { 39 | JsonObject ob = objectBuilder() 40 | .add("a", 123) 41 | .add("b", "Text") 42 | .build(); 43 | // not sure if order is guaranteed but: 44 | assertEquals("{\"a\":123,\"b\":\"Text\"}", serializeAsString(ob)); 45 | } 46 | 47 | @Test 48 | public void testNestedObject() throws Exception 49 | { 50 | JsonObject ob = objectBuilder() 51 | .add("array", arrayBuilder().add(1).add(2)) 52 | .add("obj", objectBuilder().add("first", true)) 53 | .build(); 54 | // not sure if order is guaranteed but: 55 | assertEquals("{\"array\":[1,2],\"obj\":{\"first\":true}}", serializeAsString(ob)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest extends TestBase 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = JSONPModule.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expecteed to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/TestBase.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import java.io.IOException; 4 | 5 | import jakarta.json.*; 6 | 7 | import com.fasterxml.jackson.databind.*; 8 | import com.fasterxml.jackson.databind.cfg.MapperConfig; 9 | import com.fasterxml.jackson.databind.json.JsonMapper; 10 | import com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator; 11 | 12 | public abstract class TestBase 13 | { 14 | static class NoCheckSubTypeValidator 15 | extends PolymorphicTypeValidator.Base 16 | { 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Override 20 | public Validity validateBaseType(MapperConfig config, JavaType baseType) { 21 | return Validity.ALLOWED; 22 | } 23 | } 24 | 25 | private final static JSONPModule MODULE = new JSONPModule(); 26 | 27 | private final static ObjectMapper SHARED_MAPPER = newMapper(); 28 | 29 | protected static ObjectMapper newMapper() { 30 | return mapperBuilder().build(); 31 | } 32 | 33 | protected static JsonMapper.Builder mapperBuilder() { 34 | return JsonMapper.builder() 35 | .addModule(MODULE); 36 | } 37 | 38 | protected static ObjectMapper sharedMapper() { 39 | return SHARED_MAPPER; 40 | } 41 | 42 | protected String serializeAsString(JsonValue node) throws IOException { 43 | return SHARED_MAPPER.writeValueAsString(node); 44 | } 45 | 46 | protected JsonArrayBuilder arrayBuilder() { 47 | return MODULE._builderFactory.createArrayBuilder(); 48 | } 49 | 50 | protected JsonObjectBuilder objectBuilder() { 51 | return MODULE._builderFactory.createObjectBuilder(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /jakarta-jsonp/src/test/java/com/fasterxml/jackson/datatype/jsonp/TestVersions.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonp; 2 | 3 | import java.io.*; 4 | 5 | import com.fasterxml.jackson.core.Version; 6 | import com.fasterxml.jackson.core.Versioned; 7 | 8 | import org.junit.jupiter.api.Test; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public class TestVersions extends TestBase 13 | { 14 | @Test 15 | public void testModuleVersionAndName() throws IOException 16 | { 17 | JSONPModule module = new JSONPModule(); 18 | assertVersion(module); 19 | // just because name is assigned programmatically 20 | assertEquals("jackson-datatype-jakarta-jsonp", 21 | module.getModuleName()); 22 | } 23 | 24 | /* 25 | /********************************************************** 26 | /* Helper methods 27 | /********************************************************** 28 | */ 29 | 30 | private void assertVersion(Versioned vers) 31 | { 32 | final Version v = vers.version(); 33 | assertEquals(PackageVersion.VERSION, v); 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /jakarta-mail/README.md: -------------------------------------------------------------------------------- 1 | Datatype module to make [Jackson](../../../jackson) 2 | read and write `InternetAddress`es using the Jakarta Mail API. 3 | 4 | NOTE: This module handles the new `jakarta.mail` namespace, not the old 5 | `javax.mail` namespace. 6 | 7 | ## Usage 8 | 9 | ### Maven dependency 10 | 11 | To use module on Maven-based projects, use following dependency: 12 | 13 | ```xml 14 | 15 | com.fasterxml.jackson.datatype 16 | jackson-datatype-jakarta-mail 17 | 2.13.0 18 | 19 | ``` 20 | 21 | (or whatever version is most up-to-date at the moment) 22 | 23 | ### Registering module 24 | 25 | Like all standard Jackson modules (libraries that implement Module interface), 26 | registration is done as follows (Jackson 2.x up to 2.9) 27 | 28 | ```java 29 | ObjectMapper mapper = new ObjectMapper(); 30 | mapper.registerModule(new JakartaMailModule()); 31 | ``` 32 | OR, the new method added in 2.10 (old method will work with 2.x but not 3.x): 33 | 34 | 35 | ```java 36 | ObjectMapper mapper = JsonMapper.builder() 37 | .addModule(new JakartaMailModule()) 38 | .build(); 39 | ``` 40 | 41 | after which functionality is available for all normal Jackson operations: 42 | 43 | ```java 44 | InternetAddress addr = mapper.readValue(JSON, InternetAddress.class); 45 | ``` 46 | -------------------------------------------------------------------------------- /jakarta-mail/src/main/java/com/fasterxml/jackson/datatype/jakarta/mail/JakartaInternetAddressSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Vendorflow, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.fasterxml.jackson.datatype.jakarta.mail; 18 | 19 | import java.io.IOException; 20 | 21 | import com.fasterxml.jackson.core.JsonGenerator; 22 | import com.fasterxml.jackson.databind.SerializerProvider; 23 | import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer; 24 | 25 | import jakarta.mail.internet.InternetAddress; 26 | 27 | /** 28 | * @author Christopher Smith 29 | */ 30 | public class JakartaInternetAddressSerializer extends StdScalarSerializer 31 | { 32 | private static final long serialVersionUID = 1L; 33 | 34 | public JakartaInternetAddressSerializer() { 35 | super(InternetAddress.class); 36 | } 37 | 38 | @Override 39 | public void serialize(InternetAddress value, JsonGenerator gen, SerializerProvider provider) throws IOException { 40 | gen.writeString(value.toString()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /jakarta-mail/src/main/java/com/fasterxml/jackson/datatype/jakarta/mail/JakartaMailModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Vendorflow, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.fasterxml.jackson.datatype.jakarta.mail; 18 | 19 | import com.fasterxml.jackson.databind.module.SimpleModule; 20 | 21 | import jakarta.mail.internet.InternetAddress; 22 | 23 | /** 24 | * @author Christopher Smith 25 | */ 26 | public class JakartaMailModule extends SimpleModule 27 | { 28 | private static final long serialVersionUID = 1L; 29 | 30 | public JakartaMailModule() { 31 | super(PackageVersion.VERSION); 32 | 33 | addSerializer(new JakartaInternetAddressSerializer()); 34 | addDeserializer(InternetAddress.class, new JakartaInternetAddressDeserializer()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /jakarta-mail/src/main/java/com/fasterxml/jackson/datatype/jakarta/mail/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jakarta-mail/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | This copy of Jackson JSON Jakarta Mail extension module is licensed under the 2 | Apache (Software) License, version 2.0 ("the License"). 3 | See the License for details about distribution rights, and the 4 | specific rights regarding derivative works. 5 | 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | -------------------------------------------------------------------------------- /jakarta-mail/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /jakarta-mail/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jakarta.mail.JakartaMailModule 2 | -------------------------------------------------------------------------------- /jakarta-mail/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | // Copied+modified from jakarta-jsonp one on 20-Aug-2021 2 | module com.fasterxml.jackson.datatype.jakarta.mail { 3 | requires com.fasterxml.jackson.core; 4 | requires com.fasterxml.jackson.databind; 5 | 6 | requires jakarta.mail; 7 | 8 | exports com.fasterxml.jackson.datatype.jakarta.mail; 9 | 10 | provides com.fasterxml.jackson.databind.Module with 11 | com.fasterxml.jackson.datatype.jakarta.mail.JakartaMailModule; 12 | } 13 | -------------------------------------------------------------------------------- /jakarta-mail/src/test/java/com/fasterxml/jackson/datatype/jakarta/mail/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jakarta.mail; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest extends TestBase 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = JakartaMailModule.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expecteed to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jakarta-mail/src/test/java/com/fasterxml/jackson/datatype/jakarta/mail/TestBase.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jakarta.mail; 2 | 3 | import com.fasterxml.jackson.databind.JavaType; 4 | import com.fasterxml.jackson.databind.ObjectMapper; 5 | import com.fasterxml.jackson.databind.cfg.MapperConfig; 6 | import com.fasterxml.jackson.databind.json.JsonMapper; 7 | import com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator; 8 | 9 | public abstract class TestBase 10 | { 11 | static class NoCheckSubTypeValidator 12 | extends PolymorphicTypeValidator.Base 13 | { 14 | private static final long serialVersionUID = 1L; 15 | 16 | @Override 17 | public Validity validateBaseType(MapperConfig config, JavaType baseType) { 18 | return Validity.ALLOWED; 19 | } 20 | } 21 | 22 | private final static JakartaMailModule MODULE = new JakartaMailModule(); 23 | 24 | private final static ObjectMapper SHARED_MAPPER = newMapper(); 25 | 26 | protected static ObjectMapper newMapper() { 27 | return mapperBuilder().build(); 28 | } 29 | 30 | protected static JsonMapper.Builder mapperBuilder() { 31 | return JsonMapper.builder() 32 | .addModule(MODULE); 33 | } 34 | 35 | protected static ObjectMapper sharedMapper() { 36 | return SHARED_MAPPER; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /jakarta-mail/src/test/java/com/fasterxml/jackson/datatype/jakarta/mail/VersionTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jakarta.mail; 2 | 3 | import java.io.IOException; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.fasterxml.jackson.core.Version; 8 | import com.fasterxml.jackson.core.Versioned; 9 | 10 | import static org.junit.jupiter.api.Assertions.assertEquals; 11 | 12 | public class VersionTest 13 | { 14 | @Test 15 | public void testModuleVersionAndName() throws IOException { 16 | JakartaMailModule module = new JakartaMailModule(); 17 | assertVersion(module); 18 | // just because name is assigned programmatically 19 | assertEquals("jackson-datatype-jakarta-mail", 20 | module.getModuleName()); 21 | } 22 | 23 | /* 24 | /********************************************************** 25 | /* Helper methods 26 | /********************************************************** 27 | */ 28 | 29 | private void assertVersion(Versioned vers) { 30 | final Version v = vers.version(); 31 | assertEquals(PackageVersion.VERSION, v); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/AmountWriter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import org.apiguardian.api.API; 4 | 5 | import javax.money.MonetaryAmount; 6 | 7 | import static org.apiguardian.api.API.Status.EXPERIMENTAL; 8 | 9 | @API(status = EXPERIMENTAL) 10 | public interface AmountWriter { 11 | 12 | Class getType(); 13 | 14 | T write(MonetaryAmount amount); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/BigDecimalAmountWriter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import org.apiguardian.api.API; 4 | 5 | import java.math.BigDecimal; 6 | 7 | import static org.apiguardian.api.API.Status.EXPERIMENTAL; 8 | 9 | @API(status = EXPERIMENTAL) 10 | public interface BigDecimalAmountWriter extends AmountWriter { 11 | 12 | @Override 13 | default Class getType() { 14 | return BigDecimal.class; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/CurrencyUnitDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import com.fasterxml.jackson.core.JsonParser; 4 | import com.fasterxml.jackson.databind.DeserializationContext; 5 | import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer; 6 | import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; 7 | import org.apiguardian.api.API; 8 | 9 | import javax.money.CurrencyUnit; 10 | import javax.money.Monetary; 11 | import java.io.IOException; 12 | 13 | import static org.apiguardian.api.API.Status.MAINTAINED; 14 | 15 | @API(status = MAINTAINED) 16 | public final class CurrencyUnitDeserializer extends StdScalarDeserializer 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public CurrencyUnitDeserializer() { 21 | super(CurrencyUnit.class); 22 | } 23 | 24 | @Override 25 | public Object deserializeWithType(final JsonParser parser, final DeserializationContext context, 26 | final TypeDeserializer deserializer) throws IOException { 27 | 28 | // effectively assuming no type information at all 29 | return deserialize(parser, context); 30 | } 31 | 32 | @Override 33 | public CurrencyUnit deserialize(final JsonParser parser, final DeserializationContext context) throws IOException { 34 | final String currencyCode = parser.getValueAsString(); 35 | return Monetary.getCurrency(currencyCode); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/CurrencyUnitSerializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import com.fasterxml.jackson.core.JsonGenerator; 4 | import com.fasterxml.jackson.databind.JavaType; 5 | import com.fasterxml.jackson.databind.JsonMappingException; 6 | import com.fasterxml.jackson.databind.SerializerProvider; 7 | import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper; 8 | import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer; 9 | import org.apiguardian.api.API; 10 | 11 | import javax.money.CurrencyUnit; 12 | import java.io.IOException; 13 | 14 | import static org.apiguardian.api.API.Status.MAINTAINED; 15 | 16 | @API(status = MAINTAINED) 17 | public final class CurrencyUnitSerializer extends StdScalarSerializer { 18 | private static final long serialVersionUID = 1L; 19 | 20 | CurrencyUnitSerializer() { 21 | super(CurrencyUnit.class); 22 | } 23 | 24 | @Override 25 | public void serialize(final CurrencyUnit value, final JsonGenerator generator, final SerializerProvider serializers) 26 | throws IOException { 27 | generator.writeString(value.getCurrencyCode()); 28 | } 29 | 30 | @Override 31 | public void acceptJsonFormatVisitor(final JsonFormatVisitorWrapper visitor, final JavaType hint) 32 | throws JsonMappingException { 33 | visitor.expectStringFormat(hint); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/DecimalAmountWriter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import javax.annotation.Nonnull; 4 | import javax.money.MonetaryAmount; 5 | import java.math.BigDecimal; 6 | import java.math.RoundingMode; 7 | 8 | final class DecimalAmountWriter implements BigDecimalAmountWriter { 9 | 10 | @Override 11 | public BigDecimal write(@Nonnull final MonetaryAmount amount) { 12 | final BigDecimal decimal = amount.getNumber().numberValueExact(BigDecimal.class); 13 | final int defaultFractionDigits = amount.getCurrency().getDefaultFractionDigits(); 14 | final int scale = Math.max(decimal.scale(), defaultFractionDigits); 15 | 16 | return decimal.setScale(scale, RoundingMode.UNNECESSARY); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/MonetaryAmountFactory.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import org.apiguardian.api.API; 4 | 5 | import javax.money.CurrencyUnit; 6 | import javax.money.MonetaryAmount; 7 | import java.math.BigDecimal; 8 | 9 | import static org.apiguardian.api.API.Status.STABLE; 10 | 11 | @API(status = STABLE) 12 | @FunctionalInterface 13 | public interface MonetaryAmountFactory { 14 | 15 | M create(BigDecimal amount, CurrencyUnit currency); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/MonetaryAmountFormatFactory.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import org.apiguardian.api.API; 4 | 5 | import javax.annotation.Nullable; 6 | import javax.money.format.MonetaryAmountFormat; 7 | import java.util.Locale; 8 | 9 | import static org.apiguardian.api.API.Status.STABLE; 10 | 11 | @API(status = STABLE) 12 | @FunctionalInterface 13 | public interface MonetaryAmountFormatFactory { 14 | 15 | MonetaryAmountFormatFactory NONE = locale -> null; 16 | 17 | @Nullable 18 | MonetaryAmountFormat create(final Locale defaultLocale); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/QuotedDecimalAmountWriter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import javax.money.MonetaryAmount; 4 | import java.math.BigDecimal; 5 | 6 | final class QuotedDecimalAmountWriter implements AmountWriter { 7 | 8 | private final AmountWriter delegate = new DecimalAmountWriter(); 9 | 10 | @Override 11 | public Class getType() { 12 | return String.class; 13 | } 14 | 15 | @Override 16 | public String write(final MonetaryAmount amount) { 17 | return delegate.write(amount).toPlainString(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /javax-money/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2025-2026 Zalando SE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /javax-money/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /javax-money/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.javax.money.JavaxMoneyModule 2 | -------------------------------------------------------------------------------- /javax-money/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | // Hand-crafted 05-Nov-2024 2 | module com.fasterxml.jackson.datatype.javax.money 3 | { 4 | requires com.fasterxml.jackson.annotation; 5 | requires com.fasterxml.jackson.core; 6 | requires com.fasterxml.jackson.databind; 7 | 8 | requires java.money; 9 | 10 | exports com.fasterxml.jackson.datatype.javax.money; 11 | 12 | provides com.fasterxml.jackson.databind.Module with 13 | com.fasterxml.jackson.datatype.javax.money.JavaxMoneyModule; 14 | } 15 | -------------------------------------------------------------------------------- /javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/CurrencyUnitDeserializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import javax.money.CurrencyUnit; 4 | import javax.money.UnknownCurrencyException; 5 | 6 | import org.javamoney.moneta.CurrencyUnitBuilder; 7 | import org.junit.jupiter.api.Test; 8 | 9 | import com.fasterxml.jackson.databind.ObjectMapper; 10 | import com.fasterxml.jackson.databind.json.JsonMapper; 11 | import com.fasterxml.jackson.databind.jsontype.BasicPolymorphicTypeValidator; 12 | 13 | import static org.assertj.core.api.Assertions.assertThat; 14 | import static org.junit.jupiter.api.Assertions.assertThrows; 15 | 16 | public final class CurrencyUnitDeserializerTest { 17 | 18 | private final ObjectMapper unit = JsonMapper.builder().addModule(new JavaxMoneyModule()).build(); 19 | 20 | @Test 21 | public void shouldDeserialize() throws Exception { 22 | final CurrencyUnit actual = unit.readValue("\"EUR\"", CurrencyUnit.class); 23 | final CurrencyUnit expected = CurrencyUnitBuilder.of("EUR", "default").build(); 24 | 25 | assertThat(actual).isEqualTo(expected); 26 | } 27 | 28 | @Test 29 | public void shouldNotDeserializeInvalidCurrency() { 30 | assertThrows(UnknownCurrencyException.class, () -> 31 | unit.readValue("\"FOO\"", CurrencyUnit.class)); 32 | } 33 | 34 | @Test 35 | public void shouldDeserializeWithTyping() throws Exception { 36 | unit.activateDefaultTyping(BasicPolymorphicTypeValidator.builder().build()); 37 | 38 | final CurrencyUnit actual = unit.readValue("\"EUR\"", CurrencyUnit.class); 39 | final CurrencyUnit expected = CurrencyUnitBuilder.of("EUR", "default").build(); 40 | 41 | assertThat(actual).isEqualTo(expected); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/CurrencyUnitSchemaSerializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import javax.money.CurrencyUnit; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.kjetland.jackson.jsonSchema.JsonSchemaGenerator; 8 | 9 | import com.fasterxml.jackson.databind.JsonNode; 10 | import com.fasterxml.jackson.databind.ObjectMapper; 11 | 12 | import static org.assertj.core.api.Assertions.assertThat; 13 | 14 | public final class CurrencyUnitSchemaSerializerTest { 15 | 16 | private final ObjectMapper unit = new ObjectMapper().registerModule(new JavaxMoneyModule()); 17 | 18 | @Test 19 | public void shouldSerializeJsonSchema() { 20 | JsonSchemaGenerator generator = new JsonSchemaGenerator(unit); 21 | JsonNode schemaNode = generator.generateJsonSchema(CurrencyUnit.class); 22 | assertThat(schemaNode.get("type")).isNotNull(); 23 | assertThat(schemaNode.get("type").asText()).isEqualTo("string"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/CurrencyUnitSerializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import javax.money.CurrencyUnit; 4 | 5 | import org.javamoney.moneta.CurrencyUnitBuilder; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import com.fasterxml.jackson.databind.ObjectMapper; 9 | import com.fasterxml.jackson.databind.json.JsonMapper; 10 | 11 | import static org.assertj.core.api.Assertions.assertThat; 12 | 13 | 14 | public final class CurrencyUnitSerializerTest { 15 | 16 | private final ObjectMapper unit = JsonMapper.builder().addModule(new JavaxMoneyModule()).build(); 17 | 18 | @Test 19 | public void shouldSerialize() throws Exception { 20 | final String expected = "EUR"; 21 | final CurrencyUnit currency = CurrencyUnitBuilder.of(expected, "default").build(); 22 | 23 | final String actual = unit.writeValueAsString(currency); 24 | 25 | assertThat(actual).isEqualTo('"' + expected + '"'); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/FieldNamesTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.assertj.core.api.Assertions.assertThat; 6 | 7 | public final class FieldNamesTest 8 | { 9 | @Test 10 | public void shouldOptimizeWithMethods() { 11 | final FieldNames expected = FieldNames.defaults(); 12 | final FieldNames actual = expected 13 | .withAmount(expected.getAmount()) 14 | .withCurrency(expected.getCurrency()) 15 | .withFormatted(expected.getFormatted()); 16 | 17 | assertThat(actual).isSameAs(expected); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.javax.money; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = JavaxMoneyModule.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expected to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/SchemaTestClass.java: -------------------------------------------------------------------------------- 1 | // Generated by delombok at Thu Apr 10 14:03:28 PDT 2025 2 | package com.fasterxml.jackson.datatype.javax.money; 3 | 4 | import javax.money.MonetaryAmount; 5 | 6 | public class SchemaTestClass { 7 | private final MonetaryAmount moneyOne; 8 | private final MonetaryAmount moneyTwo; 9 | 10 | //@lombok.Generated 11 | public SchemaTestClass(final MonetaryAmount moneyOne, final MonetaryAmount moneyTwo) { 12 | this.moneyOne = moneyOne; 13 | this.moneyTwo = moneyTwo; 14 | } 15 | 16 | //@lombok.Generated 17 | public MonetaryAmount getMoneyOne() { 18 | return this.moneyOne; 19 | } 20 | 21 | //@lombok.Generated 22 | public MonetaryAmount getMoneyTwo() { 23 | return this.moneyTwo; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/AmountConverter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import org.joda.money.CurrencyUnit; 6 | import org.joda.money.Money; 7 | 8 | /** 9 | * Common interface for amount conversion strategies used by {@link Money} (de)serializer. 10 | * Allows conversion of {@code Money} to implementation-specific representation of its amount, 11 | * and back to {@code Money}. 12 | */ 13 | interface AmountConverter 14 | { 15 | Object fromMoney(Money money); 16 | 17 | Money toMoney(CurrencyUnit currencyUnit, BigDecimal amount); 18 | } 19 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/AmountRepresentation.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | /** 4 | * Enumeration of available strategies used by {@link MoneySerializer} and {@link MoneyDeserializer} 5 | * to represent amounts of {@link org.joda.money.Money Money}. 6 | */ 7 | public enum AmountRepresentation { 8 | 9 | /** 10 | * Decimal number representation, where amount is (de)serialized as decimal number equal 11 | * to {@link org.joda.money.Money Money}'s amount, e.g. {@code 12.34} for 12 | * {@code Money.parse("EUR 12.34")}. 13 | * 14 | * @see DecimalNumberAmountConverter 15 | */ 16 | DECIMAL_NUMBER, 17 | 18 | /** 19 | * Decimal string representation, where amount is (de)serialized as string containing decimal 20 | * number equal to {@link org.joda.money.Money Money}'s amount, e.g. {@code "12.34"} for 21 | * {@code Money.parse("EUR 12.34")}. 22 | * 23 | * @see DecimalStringAmountConverter 24 | */ 25 | DECIMAL_STRING, 26 | 27 | /** 28 | * Minor currency unit representation, where amount is (de)serialized as long integer equal 29 | * to {@link org.joda.money.Money Money}'s amount expressed in minor currency unit, e.g. 30 | * {@code 1234} for {@code Money.parse("EUR 12.34")}, {@code 12345} for 31 | * {@code Money.parse("KWD 12.345")} or {@code 12} for {@code Money.parse("JPY 12")}. 32 | * 33 | * @see MinorCurrencyUnitAmountConverter 34 | */ 35 | MINOR_CURRENCY_UNIT, 36 | } 37 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/CurrencyUnitDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import com.fasterxml.jackson.core.JsonParser; 4 | import com.fasterxml.jackson.core.JsonToken; 5 | import com.fasterxml.jackson.databind.DeserializationContext; 6 | import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer; 7 | 8 | import org.joda.money.CurrencyUnit; 9 | 10 | import java.io.IOException; 11 | 12 | public class CurrencyUnitDeserializer extends StdScalarDeserializer 13 | { 14 | private static final long serialVersionUID = 1L; 15 | 16 | public CurrencyUnitDeserializer() { 17 | super(CurrencyUnit.class); 18 | } 19 | 20 | @Override 21 | public CurrencyUnit deserialize(final JsonParser p, 22 | final DeserializationContext ctxt) throws IOException 23 | { 24 | if (p.hasToken(JsonToken.VALUE_STRING)) { 25 | final String currencyCode = p.getText(); 26 | try { 27 | return CurrencyUnit.of(currencyCode); 28 | } catch (Exception e) { 29 | return (CurrencyUnit) ctxt.handleWeirdStringValue(handledType(), currencyCode, 30 | e.getMessage()); 31 | } 32 | } 33 | return (CurrencyUnit) ctxt.handleUnexpectedToken(handledType(), p.currentToken(), p, 34 | "Expected a `JsonToken.VALUE_STRING`, got `JsonToken.%s`", 35 | p.currentToken()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/CurrencyUnitSerializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import java.io.IOException; 4 | 5 | import org.joda.money.CurrencyUnit; 6 | 7 | import com.fasterxml.jackson.core.JsonGenerator; 8 | import com.fasterxml.jackson.databind.SerializerProvider; 9 | 10 | public class CurrencyUnitSerializer extends JodaMoneySerializerBase 11 | { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public CurrencyUnitSerializer() { 15 | super(CurrencyUnit.class); 16 | } 17 | 18 | @Override 19 | public void serialize(final CurrencyUnit currencyUnit, 20 | final JsonGenerator g, 21 | final SerializerProvider ctxt) throws IOException { 22 | g.writeString(currencyUnit.getCode()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/DecimalNumberAmountConverter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import org.joda.money.CurrencyUnit; 4 | import org.joda.money.Money; 5 | 6 | import java.math.BigDecimal; 7 | import java.math.RoundingMode; 8 | 9 | /** 10 | * An {@link AmountConverter} converting {@link Money} to its amount represented as 11 | * {@link BigDecimal decimal number} (such as {@code 12.34} for {@code Money.parse("USD 12.34")}), 12 | * and back to {@code Money} from this representation. 13 | */ 14 | final class DecimalNumberAmountConverter implements AmountConverter { 15 | 16 | private static final DecimalNumberAmountConverter INSTANCE = new DecimalNumberAmountConverter(); 17 | 18 | static DecimalNumberAmountConverter getInstance() { 19 | return INSTANCE; 20 | } 21 | 22 | private DecimalNumberAmountConverter() { 23 | } 24 | 25 | @Override 26 | public BigDecimal fromMoney(final Money money) { 27 | final BigDecimal decimal = money.getAmount(); 28 | final int decimalPlaces = money.getCurrencyUnit().getDecimalPlaces(); 29 | final int scale = Math.max(decimal.scale(), decimalPlaces); 30 | return decimal.setScale(scale, RoundingMode.UNNECESSARY); 31 | } 32 | 33 | @Override 34 | public Money toMoney(final CurrencyUnit currencyUnit, final BigDecimal amount) { 35 | return Money.of(currencyUnit, amount); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/DecimalStringAmountConverter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import org.joda.money.CurrencyUnit; 4 | import org.joda.money.Money; 5 | 6 | import java.math.BigDecimal; 7 | 8 | /** 9 | * An {@link AmountConverter} converting {@link Money} to its amount represented as decimal string 10 | * (such as {@code "12.34"} for {@code Money.parse("USD 12.34")}), and back to {@code Money} from 11 | * this representation. 12 | */ 13 | final class DecimalStringAmountConverter implements AmountConverter { 14 | 15 | private static final DecimalStringAmountConverter INSTANCE = new DecimalStringAmountConverter(); 16 | 17 | static DecimalStringAmountConverter getInstance() { 18 | return INSTANCE; 19 | } 20 | 21 | private DecimalStringAmountConverter() { 22 | } 23 | 24 | @Override 25 | public String fromMoney(final Money money) { 26 | return DecimalNumberAmountConverter.getInstance().fromMoney(money).toPlainString(); 27 | } 28 | 29 | @Override 30 | public Money toMoney(final CurrencyUnit currencyUnit, final BigDecimal amount) { 31 | return Money.of(currencyUnit, amount); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/JodaMoneySerializerBase.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonGenerator; 6 | import com.fasterxml.jackson.core.JsonToken; 7 | import com.fasterxml.jackson.core.type.WritableTypeId; 8 | 9 | import com.fasterxml.jackson.databind.SerializerProvider; 10 | import com.fasterxml.jackson.databind.jsontype.TypeSerializer; 11 | import com.fasterxml.jackson.databind.ser.std.StdSerializer; 12 | 13 | abstract class JodaMoneySerializerBase extends StdSerializer 14 | { 15 | private static final long serialVersionUID = 1L; 16 | 17 | protected JodaMoneySerializerBase(Class cls) { super(cls); } 18 | 19 | @Override 20 | public void serializeWithType(T value, JsonGenerator g, SerializerProvider provider, 21 | TypeSerializer typeSer) throws IOException 22 | { 23 | g.assignCurrentValue(value); 24 | // NOTE: we do not actually know the exact shape (or, rather, it varies by settings 25 | // and so should not claim particular shape) -- but need to make sure NOT to report 26 | // as `Shape.OBJECT` or `Shape.ARRAY` 27 | WritableTypeId typeIdDef = typeSer.writeTypePrefix(g, 28 | typeSer.typeId(value, JsonToken.VALUE_STRING)); 29 | serialize(value, g, provider); 30 | typeSer.writeTypeSuffix(g, typeIdDef); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/MinorCurrencyUnitAmountConverter.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import org.joda.money.CurrencyUnit; 4 | import org.joda.money.Money; 5 | 6 | import java.math.BigDecimal; 7 | import java.math.RoundingMode; 8 | 9 | /** 10 | * An {@link AmountConverter} converting {@link Money} to its amount represented in 11 | * {@link Money#getAmountMinorLong() minor units as a long} (such as {@code 1234} for 12 | * {@code Money.parse("USD 12.34")}), and back to {@code Money} from this representation. 13 | */ 14 | final class MinorCurrencyUnitAmountConverter implements AmountConverter 15 | { 16 | private static final MinorCurrencyUnitAmountConverter INSTANCE = new MinorCurrencyUnitAmountConverter(); 17 | 18 | static MinorCurrencyUnitAmountConverter getInstance() { 19 | return INSTANCE; 20 | } 21 | 22 | private MinorCurrencyUnitAmountConverter() { 23 | } 24 | 25 | @Override 26 | public Long fromMoney(final Money money) { 27 | return money.getAmountMinorLong(); 28 | } 29 | 30 | @Override 31 | public Money toMoney(final CurrencyUnit currencyUnit, final BigDecimal amount) { 32 | return Money.of(currencyUnit, amount.movePointLeft(currencyUnit.getDecimalPlaces()), RoundingMode.UNNECESSARY); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joda-money/src/main/java/com/fasterxml/jackson/datatype/jodamoney/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /joda-money/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | This copy of Jackson JODA Money extension module is licensed under the 2 | Apache (Software) License, version 2.0 ("the License"). 3 | See the License for details about distribution rights, and the 4 | specific rights regarding derivative works. 5 | 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | -------------------------------------------------------------------------------- /joda-money/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /joda-money/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jodamoney.JodaMoneyModule 2 | -------------------------------------------------------------------------------- /joda-money/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | 2 | // Generated 27-Mar-2019 using Moditect maven plugin 3 | module com.fasterxml.jackson.datatype.joda { 4 | requires com.fasterxml.jackson.annotation; 5 | requires com.fasterxml.jackson.core; 6 | requires com.fasterxml.jackson.databind; 7 | requires joda.money; 8 | 9 | exports com.fasterxml.jackson.datatype.jodamoney; 10 | 11 | provides com.fasterxml.jackson.databind.Module with 12 | com.fasterxml.jackson.datatype.jodamoney.JodaMoneyModule; 13 | } 14 | -------------------------------------------------------------------------------- /joda-money/src/test/java/com/fasterxml/jackson/datatype/jodamoney/CurrencyUnitDeserializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import org.joda.money.CurrencyUnit; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.fasterxml.jackson.databind.ObjectMapper; 8 | import com.fasterxml.jackson.databind.exc.InvalidFormatException; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public final class CurrencyUnitDeserializerTest extends ModuleTestBase 13 | { 14 | private final ObjectMapper MAPPER = mapperWithModule(); 15 | 16 | @Test 17 | public void testShouldDeserialize() throws Exception 18 | { 19 | assertEquals(CurrencyUnit.EUR, 20 | MAPPER.readValue("\"EUR\"", CurrencyUnit.class)); 21 | } 22 | 23 | @Test 24 | public void testShouldNotDeserializeInvalidCurrency() throws Exception 25 | { 26 | try { 27 | MAPPER.readValue("\"UNKNOWN\"", CurrencyUnit.class); 28 | fail("Should not pass"); 29 | } catch (final InvalidFormatException e) { 30 | verifyException(e, "Cannot deserialize value of type `org.joda.money.CurrencyUnit"); 31 | verifyException(e, "from String \"UNKNOWN\": Unknown currency"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /joda-money/src/test/java/com/fasterxml/jackson/datatype/jodamoney/CurrencyUnitSerializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import org.joda.money.CurrencyUnit; 6 | 7 | import com.fasterxml.jackson.core.JsonProcessingException; 8 | import com.fasterxml.jackson.databind.ObjectMapper; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public final class CurrencyUnitSerializerTest extends ModuleTestBase 13 | { 14 | private final ObjectMapper objectMapper = mapperWithModule(); 15 | 16 | @Test 17 | public void testShouldSerialize() throws JsonProcessingException { 18 | final String expectedCurrencyUnit = "EUR"; 19 | 20 | final String actual = objectMapper.writeValueAsString(CurrencyUnit.EUR); 21 | 22 | assertEquals('"' + expectedCurrencyUnit + '"', actual); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /joda-money/src/test/java/com/fasterxml/jackson/datatype/jodamoney/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest extends ModuleTestBase 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = JodaMoneyModule.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expected to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /joda-money/src/test/java/com/fasterxml/jackson/datatype/jodamoney/PolymorphicHandlingTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import org.joda.money.CurrencyUnit; 6 | import org.joda.money.Money; 7 | 8 | import org.junit.jupiter.api.Test; 9 | 10 | import com.fasterxml.jackson.databind.*; 11 | 12 | import static org.junit.jupiter.api.Assertions.*; 13 | 14 | public class PolymorphicHandlingTest extends ModuleTestBase 15 | { 16 | @Test 17 | public void testPolymorphicMoney() throws Exception { 18 | ObjectMapper mapper = polyMapperFor(Money.class); 19 | final Money input = Money.of(CurrencyUnit.CAD, BigDecimal.valueOf(17.25)); 20 | 21 | String json = mapper.writeValueAsString(input); 22 | 23 | Money result = mapper.readValue(json, Money.class); 24 | assertEquals(input, result); 25 | assertEquals(CurrencyUnit.CAD, result.getCurrencyUnit()); 26 | assertEquals(17, result.getAmountMajorInt()); 27 | assertEquals(1725, result.getAmountMinorInt()); 28 | } 29 | 30 | @Test 31 | public void testPolymorphicCurrency() throws Exception { 32 | ObjectMapper mapper = polyMapperFor(CurrencyUnit.class); 33 | String json = mapper.writeValueAsString(CurrencyUnit.EUR); 34 | 35 | assertEquals(CurrencyUnit.EUR, 36 | mapper.readValue(json, CurrencyUnit.class)); 37 | 38 | } 39 | 40 | private ObjectMapper polyMapperFor(Class target) { 41 | return mapperWithModuleBuilder() 42 | .addMixIn(target, ForceJsonTypeInfo.class) 43 | .build(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /joda-money/src/test/java/com/fasterxml/jackson/datatype/jodamoney/TestVersions.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jodamoney; 2 | 3 | import java.io.*; 4 | 5 | import com.fasterxml.jackson.core.Versioned; 6 | 7 | /** 8 | * Simple verification that version access works. 9 | */ 10 | import org.junit.jupiter.api.Test; 11 | 12 | import static org.junit.jupiter.api.Assertions.*; 13 | 14 | public class TestVersions extends ModuleTestBase 15 | { 16 | @Test 17 | public void testVersions() throws IOException 18 | { 19 | assertVersion(new JodaMoneyModule()); 20 | } 21 | 22 | // just because name is assigned programmatically 23 | @Test 24 | public void testModuleName() 25 | { 26 | assertEquals("jackson-datatype-joda-money", 27 | new JodaMoneyModule().getModuleName()); 28 | } 29 | 30 | /* 31 | /********************************************************** 32 | /* Helper methods 33 | /********************************************************** 34 | */ 35 | 36 | private void assertVersion(Versioned v) 37 | { 38 | assertEquals(com.fasterxml.jackson.datatype.jodamoney.PackageVersion.VERSION, 39 | v.version()); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /json-org/README.md: -------------------------------------------------------------------------------- 1 | One of [Jackson](../../../..jackson) [Misec. datatype modules](../../..). 2 | Supports JSON serialization and deserialization of 3 | ["org.json" JSON library](http://json.org/java) datatypes, most commonly 4 | seen in Android SDK. 5 | 6 | ## Usage 7 | 8 | ### Maven dependency 9 | 10 | To use module on Maven-based projects, use following dependency: 11 | 12 | ```xml 13 | 14 | com.fasterxml.jackson.datatype 15 | jackson-datatype-json-org 16 | 2.11.0 17 | 18 | ``` 19 | 20 | (or whatever version is most up-to-date at the moment) 21 | 22 | ### Registering module 23 | 24 | Like all standard Jackson modules (libraries that implement Module interface), registration is done as follows (Jackson 2.x up to 2.9) 25 | 26 | ```java 27 | // import com.fasterxml.jackson.datatype.jsonorg.JsonOrgModule; 28 | 29 | ObjectMapper mapper = new ObjectMapper() 30 | .registerModule(new JsonOrgModule()); 31 | ``` 32 | OR, the new method added in 2.10 (old method will work with 2.x but not 3.x): 33 | 34 | ```java 35 | ObjectMapper mapper = JsonMapper.builder() 36 | .addModule(new JsonOrgModule()) 37 | .build(); 38 | ``` 39 | 40 | after which functionality is available with all normal Jackson operations, like: 41 | 42 | ```java 43 | JSONObject ob = mapper.readValue("{\"a\":{\"b\":3}, \"c\":[9, -4], \"d\":null, \"e\":true}", 44 | JSONObject.class); 45 | assertEquals(4, ob.length()); 46 | JSONObject ob2 = ob.getJSONObject("a"); 47 | assertEquals(1, ob2.length()); 48 | ``` 49 | -------------------------------------------------------------------------------- /json-org/src/main/java/com/fasterxml/jackson/datatype/jsonorg/JSONBaseSerializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import com.fasterxml.jackson.databind.ser.std.StdSerializer; 4 | 5 | abstract class JSONBaseSerializer extends StdSerializer 6 | { 7 | private static final long serialVersionUID = 1L; 8 | 9 | protected JSONBaseSerializer(Class cls) { super(cls); } 10 | } 11 | -------------------------------------------------------------------------------- /json-org/src/main/java/com/fasterxml/jackson/datatype/jsonorg/JsonOrgModule.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import com.fasterxml.jackson.databind.module.SimpleModule; 4 | 5 | import org.json.JSONArray; 6 | import org.json.JSONObject; 7 | 8 | public class JsonOrgModule extends SimpleModule 9 | { 10 | private static final long serialVersionUID = 1; 11 | 12 | /* 13 | /********************************************************** 14 | /* Life-cycle 15 | /********************************************************** 16 | */ 17 | 18 | public JsonOrgModule() 19 | { 20 | super(PackageVersion.VERSION); 21 | addDeserializer(JSONArray.class, JSONArrayDeserializer.instance); 22 | addDeserializer(JSONObject.class, JSONObjectDeserializer.instance); 23 | addSerializer(JSONArraySerializer.instance); 24 | addSerializer(JSONObjectSerializer.instance); 25 | } 26 | } -------------------------------------------------------------------------------- /json-org/src/main/java/com/fasterxml/jackson/datatype/jsonorg/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /json-org/src/main/java/com/fasterxml/jackson/datatype/jsonorg/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Package that contains support for "org.json" library 3 | * datatypes for JSON content. 4 | */ 5 | package com.fasterxml.jackson.datatype.jsonorg; 6 | -------------------------------------------------------------------------------- /json-org/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | This copy of Jackson JSON-org extension module is licensed under the 2 | Apache (Software) License, version 2.0 ("the License"). 3 | See the License for details about distribution rights, and the 4 | specific rights regarding derivative works. 5 | 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | -------------------------------------------------------------------------------- /json-org/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /json-org/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsonorg.JsonOrgModule 2 | -------------------------------------------------------------------------------- /json-org/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | // Generated 27-Mar-2019 using Moditect maven plugin 2 | module com.fasterxml.jackson.datatype.jsonorg { 3 | requires com.fasterxml.jackson.core; 4 | requires com.fasterxml.jackson.databind; 5 | 6 | // is this the package name 7 | requires static json; 8 | //^2015 9 | requires static org.json; 10 | 11 | exports com.fasterxml.jackson.datatype.jsonorg; 12 | 13 | provides com.fasterxml.jackson.databind.Module with 14 | com.fasterxml.jackson.datatype.jsonorg.JsonOrgModule; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/ConvertTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import org.json.JSONArray; 7 | import org.json.JSONObject; 8 | 9 | import org.junit.jupiter.api.Test; 10 | 11 | import com.fasterxml.jackson.databind.ObjectMapper; 12 | import com.fasterxml.jackson.databind.exc.MismatchedInputException; 13 | 14 | import static org.junit.jupiter.api.Assertions.*; 15 | 16 | public class ConvertTest extends ModuleTestBase 17 | { 18 | static class TestDomain { 19 | public Integer id; 20 | public String name; 21 | public Double da; 22 | public Map ldt; 23 | public Map ld; 24 | public Map lt; 25 | public JSONObject jsn; 26 | public JSONArray jsa; 27 | } 28 | 29 | private final ObjectMapper MAPPER = newMapper(); 30 | 31 | @Test 32 | public void testIssue15() throws Exception 33 | { 34 | Map map = new HashMap<>(); 35 | map.put("name", "zpj"); 36 | map.put("id", 111); 37 | map.put("jsa", "[1, 34, 32, \"zpj\", {\"age\": 18, \"name\": \"zpj\", \"child\": {\"name\": \"zzy\", \"gender\": \"nan\"}}, {\"url\": \"test\", \"name\": \"suhu\"}]"); 38 | final String json = MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(map); 39 | try { 40 | MAPPER.readValue(json, TestDomain.class); 41 | fail("Should not pass"); 42 | } catch (MismatchedInputException e) { 43 | verifyException(e, "Unexpected token"); 44 | verifyException(e, "org.json.JSONArray"); 45 | verifyException(e, "START_ARRAY"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest extends ModuleTestBase 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = JsonOrgModule.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expected to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/ModuleTestBase.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import java.util.Arrays; 4 | 5 | import com.fasterxml.jackson.databind.ObjectMapper; 6 | import com.fasterxml.jackson.databind.json.JsonMapper; 7 | 8 | public abstract class ModuleTestBase 9 | { 10 | public ObjectMapper newMapper() { 11 | return new ObjectMapper() 12 | .registerModule(new JsonOrgModule()); 13 | } 14 | 15 | public JsonMapper.Builder newMapperBuilder() { 16 | return JsonMapper.builder() 17 | .addModule(new JsonOrgModule()); 18 | } 19 | 20 | protected void verifyException(Throwable e, String... matches) 21 | { 22 | String msg = e.getMessage(); 23 | String lmsg = (msg == null) ? "" : msg.toLowerCase(); 24 | for (String match : matches) { 25 | String lmatch = match.toLowerCase(); 26 | if (lmsg.indexOf(lmatch) >= 0) { 27 | return; 28 | } 29 | } 30 | throw new Error("Expected an exception with one of substrings ("+Arrays.asList(matches)+"): got one with message \""+msg+"\""); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/SimpleWriteTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import com.fasterxml.jackson.databind.*; 4 | 5 | import org.json.*; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class SimpleWriteTest extends ModuleTestBase 12 | { 13 | @Test 14 | public void testWriteObject() throws Exception 15 | { 16 | final ObjectMapper mapper = newMapper(); 17 | 18 | // Ok: let's create JSONObject from JSON text 19 | String JSON = "{\"a\":{\"b\":3}}"; 20 | JSONTokener tok = new JSONTokener(JSON); 21 | JSONObject ob = (JSONObject) tok.nextValue(); 22 | assertEquals(JSON, mapper.writeValueAsString(ob)); 23 | 24 | // And for [Issue#2], with null(s): 25 | JSON = "{\"a\":null}"; 26 | tok = new JSONTokener(JSON); 27 | ob = (JSONObject) tok.nextValue(); 28 | assertEquals(JSON, mapper.writeValueAsString(ob)); 29 | } 30 | 31 | @Test 32 | public void testWriteArray() throws Exception 33 | { 34 | final ObjectMapper mapper = newMapper(); 35 | 36 | // Ok: let's create JSONObject from JSON text 37 | String JSON = "[1,true,\"text\",[null,3],{\"a\":[1.25]}]"; 38 | JSONTokener tok = new JSONTokener(JSON); 39 | JSONArray ob = (JSONArray) tok.nextValue(); 40 | assertEquals(JSON, mapper.writeValueAsString(ob)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /json-org/src/test/java/com/fasterxml/jackson/datatype/jsonorg/TestVersions.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsonorg; 2 | 3 | import java.io.*; 4 | 5 | import com.fasterxml.jackson.core.Version; 6 | import com.fasterxml.jackson.core.Versioned; 7 | 8 | import org.junit.jupiter.api.Test; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public class TestVersions extends ModuleTestBase 13 | { 14 | @Test 15 | public void testModuleVersionAndName() throws IOException 16 | { 17 | JsonOrgModule module = new JsonOrgModule(); 18 | assertVersion(module); 19 | // just because name is assigned programmatically 20 | assertEquals("jackson-datatype-json-org", 21 | module.getModuleName()); 22 | } 23 | 24 | /* 25 | /********************************************************** 26 | /* Helper methods 27 | /********************************************************** 28 | */ 29 | 30 | private void assertVersion(Versioned vers) 31 | { 32 | final Version v = vers.version(); 33 | assertEquals(PackageVersion.VERSION, v); 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /jsr-353/src/main/java/com/fasterxml/jackson/datatype/jsr353/JsonMergePatchDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import com.fasterxml.jackson.core.JsonParser; 4 | import com.fasterxml.jackson.databind.DeserializationContext; 5 | import com.fasterxml.jackson.databind.deser.std.StdDeserializer; 6 | import com.fasterxml.jackson.databind.type.LogicalType; 7 | 8 | import javax.json.Json; 9 | import javax.json.JsonMergePatch; 10 | import java.io.IOException; 11 | 12 | public class JsonMergePatchDeserializer extends StdDeserializer { 13 | private static final long serialVersionUID = 1L; 14 | protected final JsonValueDeserializer jsonValueDeser; 15 | 16 | public JsonMergePatchDeserializer(JsonValueDeserializer jsonValueDeser) { 17 | super(JsonMergePatch.class); 18 | this.jsonValueDeser = jsonValueDeser; 19 | } 20 | 21 | @Override 22 | public LogicalType logicalType() { 23 | return jsonValueDeser.logicalType(); 24 | } 25 | 26 | @Override 27 | public JsonMergePatch deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { 28 | return Json.createMergePatch(jsonValueDeser.deserialize(p, ctxt)); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /jsr-353/src/main/java/com/fasterxml/jackson/datatype/jsr353/JsonPatchDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import com.fasterxml.jackson.core.JsonParser; 4 | import com.fasterxml.jackson.core.JsonToken; 5 | import com.fasterxml.jackson.databind.DeserializationContext; 6 | import com.fasterxml.jackson.databind.deser.std.StdDeserializer; 7 | import com.fasterxml.jackson.databind.exc.InvalidFormatException; 8 | import com.fasterxml.jackson.databind.type.LogicalType; 9 | 10 | import javax.json.JsonPatch; 11 | import javax.json.spi.JsonProvider; 12 | import java.io.IOException; 13 | 14 | public class JsonPatchDeserializer extends StdDeserializer { 15 | private static final long serialVersionUID = 1L; 16 | 17 | protected final JsonValueDeserializer jsonValueDeser; 18 | 19 | public JsonPatchDeserializer(JsonValueDeserializer jsonValueDeser) { 20 | super(JsonPatch.class); 21 | this.jsonValueDeser = jsonValueDeser; 22 | } 23 | 24 | @Override 25 | public LogicalType logicalType() { 26 | return jsonValueDeser.logicalType(); 27 | } 28 | 29 | @Override 30 | public JsonPatch deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { 31 | if (p.currentToken() != JsonToken.START_ARRAY) { 32 | throw InvalidFormatException.from(p, "JSON patch has to be an array of objects", p.getText(), 33 | handledType()); 34 | } 35 | return provider.createPatch(jsonValueDeser._deserializeArray(p, ctxt)); 36 | } 37 | 38 | private final static JsonProvider provider = JsonProvider.provider(); 39 | } 40 | -------------------------------------------------------------------------------- /jsr-353/src/main/java/com/fasterxml/jackson/datatype/jsr353/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jsr-353/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | This copy of Jackson JSR-353 extension module is licensed under the 2 | Apache (Software) License, version 2.0 ("the License"). 3 | See the License for details about distribution rights, and the 4 | specific rights regarding derivative works. 5 | 6 | You may obtain a copy of the License at: 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | -------------------------------------------------------------------------------- /jsr-353/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /jsr-353/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.jsr353.JSR353Module 2 | -------------------------------------------------------------------------------- /jsr-353/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | // Generated 28-Mar-2019 using Moditect maven plugin 2 | module com.fasterxml.jackson.datatype.jsr353 { 3 | requires com.fasterxml.jackson.core; 4 | requires com.fasterxml.jackson.databind; 5 | 6 | // 08-Jan-2020, tatu: changed in 2.12.1 from "javax.json.api" 7 | requires java.json; 8 | 9 | exports com.fasterxml.jackson.datatype.jsr353; 10 | 11 | provides com.fasterxml.jackson.databind.Module with 12 | com.fasterxml.jackson.datatype.jsr353.JSR353Module; 13 | } 14 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/DeserViaCreatorTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import javax.json.JsonObject; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.fasterxml.jackson.annotation.JsonCreator; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | import com.fasterxml.jackson.databind.ObjectMapper; 10 | 11 | import static org.junit.jupiter.api.Assertions.*; 12 | 13 | public class DeserViaCreatorTest extends TestBase 14 | { 15 | static class Pojo { 16 | String text; 17 | JsonObject object; 18 | 19 | @JsonCreator 20 | public Pojo(@JsonProperty("s") String s, @JsonProperty("o") JsonObject o) { 21 | text = s; 22 | object = o; 23 | } 24 | } 25 | 26 | @Test 27 | public void testCreatorDeser() throws Exception 28 | { 29 | final ObjectMapper mapper = sharedMapper(); 30 | Pojo p = mapper.readerFor(Pojo.class) 31 | .readValue( "{\"s\": \"String\", \"o\": { \"a\": 1, \"b\": \"2\" } }"); 32 | assertNotNull(p); 33 | assertNotNull(p.object); 34 | 35 | p = mapper.readerFor(Pojo.class).readValue("{\"s\": \"String\"}"); 36 | assertNotNull(p); 37 | // has to remain `null` as JsonValue.NULL is not JsonObject 38 | assertNull(p.object); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/JsonMergePatchSerializationTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import javax.json.JsonMergePatch; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.fasterxml.jackson.databind.ObjectMapper; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class JsonMergePatchSerializationTest extends TestBase 12 | { 13 | private static final ObjectMapper MAPPER = newMapper(); 14 | 15 | @Test 16 | public void testSimpleSerialization() throws Exception 17 | { 18 | // First need a patch so deserialization must work 19 | final String input = "{" + 20 | "\"name\":\"Json\"" + 21 | "}"; 22 | final JsonMergePatch patch1 = MAPPER.readValue(input, JsonMergePatch.class); 23 | final String output = MAPPER.writeValueAsString(patch1); 24 | 25 | // and read back 26 | final JsonMergePatch patch2 = MAPPER.readValue(output, JsonMergePatch.class); 27 | assertEquals(patch1.toJsonValue(), patch2.toJsonValue()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/JsonPatchSerializationTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import javax.json.JsonPatch; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.fasterxml.jackson.databind.ObjectMapper; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class JsonPatchSerializationTest extends TestBase 12 | { 13 | private static final ObjectMapper MAPPER = newMapper(); 14 | 15 | @Test 16 | public void testSimpleSerialization() throws Exception 17 | { 18 | // First need a patch so deserialization must work 19 | final String input = "[" + 20 | "{" + 21 | "\"op\":\"replace\"," + 22 | "\"path\":\"/name\"," + 23 | "\"value\":\"Json\"" + 24 | "}" + 25 | "]"; 26 | final JsonPatch jsonPatch = MAPPER.readValue(input, JsonPatch.class); 27 | final String output = MAPPER.writeValueAsString(jsonPatch); 28 | 29 | // and read back 30 | final JsonPatch jsonPatch2 = MAPPER.readValue(output, JsonPatch.class); 31 | assertEquals(jsonPatch, jsonPatch2); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/JsonValueSerializationTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import javax.json.*; 8 | 9 | import static org.junit.jupiter.api.Assertions.*; 10 | 11 | public class JsonValueSerializationTest extends TestBase 12 | { 13 | @Test 14 | public void testSimpleArray() throws Exception 15 | { 16 | JsonArray arr = arrayBuilder() 17 | .add(true) 18 | .addNull() 19 | .add(123) 20 | .add(new BigDecimal("15.25")) 21 | .build(); 22 | assertEquals("[true,null,123,15.25]", serializeAsString(arr)); 23 | } 24 | 25 | @Test 26 | public void testNestedArray() throws Exception 27 | { 28 | JsonArray arr = arrayBuilder() 29 | .add(1) 30 | .add(arrayBuilder().add(false).add(45).build()) 31 | .add(objectBuilder().add("foo", 13).build()) 32 | .build(); 33 | assertEquals("[1,[false,45],{\"foo\":13}]", serializeAsString(arr)); 34 | } 35 | 36 | @Test 37 | public void testSimpleObject() throws Exception 38 | { 39 | JsonObject ob = objectBuilder() 40 | .add("a", 123) 41 | .add("b", "Text") 42 | .build(); 43 | // not sure if order is guaranteed but: 44 | assertEquals("{\"a\":123,\"b\":\"Text\"}", serializeAsString(ob)); 45 | } 46 | 47 | @Test 48 | public void testNestedObject() throws Exception 49 | { 50 | JsonObject ob = objectBuilder() 51 | .add("array", arrayBuilder().add(1).add(2)) 52 | .add("obj", objectBuilder().add("first", true)) 53 | .build(); 54 | // not sure if order is guaranteed but: 55 | assertEquals("{\"array\":[1,2],\"obj\":{\"first\":true}}", serializeAsString(ob)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest extends TestBase 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = JSR353Module.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expected to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/TestBase.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.json.*; 6 | 7 | import com.fasterxml.jackson.databind.JavaType; 8 | import com.fasterxml.jackson.databind.ObjectMapper; 9 | import com.fasterxml.jackson.databind.cfg.MapperConfig; 10 | import com.fasterxml.jackson.databind.json.JsonMapper; 11 | import com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator; 12 | 13 | public abstract class TestBase 14 | { 15 | static class NoCheckSubTypeValidator 16 | extends PolymorphicTypeValidator.Base 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | @Override 21 | public Validity validateBaseType(MapperConfig config, JavaType baseType) { 22 | return Validity.ALLOWED; 23 | } 24 | } 25 | 26 | private final static JSR353Module MODULE = new JSR353Module(); 27 | 28 | private final static ObjectMapper SHARED_MAPPER = newMapper(); 29 | 30 | protected static ObjectMapper newMapper() { 31 | return mapperBuilder().build(); 32 | } 33 | 34 | protected static JsonMapper.Builder mapperBuilder() { 35 | return JsonMapper.builder() 36 | .addModule(MODULE); 37 | } 38 | 39 | protected static ObjectMapper sharedMapper() { 40 | return SHARED_MAPPER; 41 | } 42 | 43 | protected String serializeAsString(JsonValue node) throws IOException { 44 | return SHARED_MAPPER.writeValueAsString(node); 45 | } 46 | 47 | protected JsonArrayBuilder arrayBuilder() { 48 | return MODULE._builderFactory.createArrayBuilder(); 49 | } 50 | 51 | protected JsonObjectBuilder objectBuilder() { 52 | return MODULE._builderFactory.createObjectBuilder(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /jsr-353/src/test/java/com/fasterxml/jackson/datatype/jsr353/TestVersions.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.jsr353; 2 | 3 | import java.io.*; 4 | 5 | import com.fasterxml.jackson.core.Version; 6 | import com.fasterxml.jackson.core.Versioned; 7 | 8 | import org.junit.jupiter.api.Test; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public class TestVersions extends TestBase 13 | { 14 | @Test 15 | public void testModuleVersionAndName() throws IOException 16 | { 17 | JSR353Module module = new JSR353Module(); 18 | assertVersion(module); 19 | // just because name is assigned programmatically 20 | assertEquals("jackson-datatype-jsr353", 21 | module.getModuleName()); 22 | } 23 | 24 | /* 25 | /********************************************************** 26 | /* Helper methods 27 | /********************************************************** 28 | */ 29 | 30 | private void assertVersion(Versioned vers) 31 | { 32 | final Version v = vers.version(); 33 | assertEquals(PackageVersion.VERSION, v); 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /moneta/src/main/java/com/fasterxml/jackson/datatype/moneta/PackageVersion.java.in: -------------------------------------------------------------------------------- 1 | package @package@; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | /** 8 | * Automatically generated from PackageVersion.java.in during 9 | * packageVersion-generate execution of maven-replacer-plugin in 10 | * pom.xml. 11 | */ 12 | public final class PackageVersion implements Versioned { 13 | public final static Version VERSION = VersionUtil.parseVersion( 14 | "@projectversion@", "@projectgroupid@", "@projectartifactid@"); 15 | 16 | @Override 17 | public Version version() { 18 | return VERSION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /moneta/src/main/resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2025-2026 Zalando SE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /moneta/src/main/resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | # Jackson JSON processor 2 | 3 | Jackson is a high-performance, Free/Open Source JSON processing library. 4 | It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has 5 | been in development since 2007. 6 | It is currently developed by a community of developers. 7 | 8 | ## Licensing 9 | 10 | Jackson components are licensed under Apache (Software) License, version 2.0, 11 | as per accompanying LICENSE file. 12 | 13 | ## Credits 14 | 15 | A list of contributors may be found from CREDITS file, which is included 16 | in some artifacts (usually source distributions); but is always available 17 | from the source code management (SCM) system project uses. 18 | -------------------------------------------------------------------------------- /moneta/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.datatype.moneta.MonetaMoneyModule 2 | -------------------------------------------------------------------------------- /moneta/src/moditect/module-info.java: -------------------------------------------------------------------------------- 1 | // Hand-crafted 29-Jan-2025 2 | module com.fasterxml.jackson.datatype.moneta 3 | { 4 | requires com.fasterxml.jackson.annotation; 5 | requires com.fasterxml.jackson.core; 6 | requires com.fasterxml.jackson.databind; 7 | 8 | requires com.fasterxml.jackson.datatype.javax.money; 9 | 10 | requires java.money; 11 | 12 | exports com.fasterxml.jackson.datatype.moneta; 13 | 14 | provides com.fasterxml.jackson.databind.Module with 15 | com.fasterxml.jackson.datatype.moneta.MonetaMoneyModule; 16 | } 17 | -------------------------------------------------------------------------------- /moneta/src/test/java/com/fasterxml/jackson/datatype/moneta/CurrencyUnitDeserializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.moneta; 2 | 3 | import javax.money.CurrencyUnit; 4 | import javax.money.UnknownCurrencyException; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | import com.fasterxml.jackson.databind.ObjectMapper; 9 | import com.fasterxml.jackson.databind.json.JsonMapper; 10 | import com.fasterxml.jackson.databind.jsontype.BasicPolymorphicTypeValidator; 11 | 12 | import org.javamoney.moneta.CurrencyUnitBuilder; 13 | 14 | import static org.assertj.core.api.Assertions.assertThat; 15 | import static org.junit.jupiter.api.Assertions.assertThrows; 16 | 17 | public final class CurrencyUnitDeserializerTest { 18 | 19 | private final ObjectMapper unit = JsonMapper.builder().addModule(new MonetaMoneyModule()).build(); 20 | 21 | @Test 22 | public void shouldDeserialize() throws Exception { 23 | final CurrencyUnit actual = unit.readValue("\"EUR\"", CurrencyUnit.class); 24 | final CurrencyUnit expected = CurrencyUnitBuilder.of("EUR", "default").build(); 25 | 26 | assertThat(actual).isEqualTo(expected); 27 | } 28 | 29 | @Test 30 | public void shouldNotDeserializeInvalidCurrency() { 31 | assertThrows(UnknownCurrencyException.class, () -> 32 | unit.readValue("\"FOO\"", CurrencyUnit.class)); 33 | } 34 | 35 | @Test 36 | public void shouldDeserializeWithTyping() throws Exception { 37 | unit.activateDefaultTyping(BasicPolymorphicTypeValidator.builder().build()); 38 | 39 | final CurrencyUnit actual = unit.readValue("\"EUR\"", CurrencyUnit.class); 40 | final CurrencyUnit expected = CurrencyUnitBuilder.of("EUR", "default").build(); 41 | 42 | assertThat(actual).isEqualTo(expected); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /moneta/src/test/java/com/fasterxml/jackson/datatype/moneta/CurrencyUnitSchemaSerializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.moneta; 2 | 3 | import javax.money.CurrencyUnit; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | import com.kjetland.jackson.jsonSchema.JsonSchemaGenerator; 8 | 9 | import com.fasterxml.jackson.databind.JsonNode; 10 | import com.fasterxml.jackson.databind.ObjectMapper; 11 | import com.fasterxml.jackson.databind.json.JsonMapper; 12 | 13 | import static org.assertj.core.api.Assertions.assertThat; 14 | 15 | public final class CurrencyUnitSchemaSerializerTest { 16 | 17 | private final ObjectMapper unit = JsonMapper.builder().addModule(new MonetaMoneyModule()).build(); 18 | 19 | @Test 20 | public void shouldSerializeJsonSchema() { 21 | JsonSchemaGenerator generator = new JsonSchemaGenerator(unit); 22 | JsonNode schemaNode = generator.generateJsonSchema(CurrencyUnit.class); 23 | assertThat(schemaNode.get("type")).isNotNull(); 24 | assertThat(schemaNode.get("type").asText()).isEqualTo("string"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /moneta/src/test/java/com/fasterxml/jackson/datatype/moneta/CurrencyUnitSerializerTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.moneta; 2 | 3 | import javax.money.CurrencyUnit; 4 | 5 | import org.javamoney.moneta.CurrencyUnitBuilder; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import com.fasterxml.jackson.core.JsonProcessingException; 9 | import com.fasterxml.jackson.databind.ObjectMapper; 10 | import com.fasterxml.jackson.databind.json.JsonMapper; 11 | 12 | import static org.assertj.core.api.Assertions.assertThat; 13 | 14 | public final class CurrencyUnitSerializerTest { 15 | 16 | private final ObjectMapper unit = JsonMapper.builder().addModule(new MonetaMoneyModule()).build(); 17 | 18 | @Test 19 | public void shouldSerialize() throws JsonProcessingException { 20 | final String expected = "EUR"; 21 | final CurrencyUnit currency = CurrencyUnitBuilder.of(expected, "default").build(); 22 | 23 | final String actual = unit.writeValueAsString(currency); 24 | 25 | assertThat(actual).isEqualTo('"' + expected + '"'); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /moneta/src/test/java/com/fasterxml/jackson/datatype/moneta/ModuleSPIMetadataTest.java: -------------------------------------------------------------------------------- 1 | package com.fasterxml.jackson.datatype.moneta; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.*; 6 | 7 | import java.util.ServiceLoader; 8 | 9 | public class ModuleSPIMetadataTest 10 | { 11 | @Test 12 | void testModuleSPIMetadata() { 13 | ServiceLoader loader 14 | = ServiceLoader.load(com.fasterxml.jackson.databind.Module.class); 15 | assertTrue(loader.iterator().hasNext(), 16 | "Expected at least one `Module` implementation to be found via `ServiceLoader`"); 17 | final String exp = MonetaMoneyModule.class.getName(); 18 | int count = 0; 19 | 20 | try { 21 | for (com.fasterxml.jackson.databind.Module service : loader) { 22 | ++count; 23 | if (service.getClass().getName().equals(exp)) { 24 | return; 25 | } 26 | } 27 | } catch (Throwable t) { 28 | fail("Expected to find `"+exp+"` Module (found "+count+" so far), problem: "+t); 29 | } 30 | fail("Expected to find `"+exp+"` Module (found "+count+" others)"); 31 | assertEquals(1, count); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /moneta/src/test/java/com/fasterxml/jackson/datatype/moneta/SchemaTestClass.java: -------------------------------------------------------------------------------- 1 | // Generated by delombok at Thu Apr 10 14:03:28 PDT 2025 2 | package com.fasterxml.jackson.datatype.moneta; 3 | 4 | import javax.money.MonetaryAmount; 5 | 6 | public class SchemaTestClass { 7 | private final MonetaryAmount moneyOne; 8 | private final MonetaryAmount moneyTwo; 9 | 10 | //@lombok.Generated 11 | public SchemaTestClass(final MonetaryAmount moneyOne, final MonetaryAmount moneyTwo) { 12 | this.moneyOne = moneyOne; 13 | this.moneyTwo = moneyTwo; 14 | } 15 | 16 | //@lombok.Generated 17 | public MonetaryAmount getMoneyOne() { 18 | return this.moneyOne; 19 | } 20 | 21 | //@lombok.Generated 22 | public MonetaryAmount getMoneyTwo() { 23 | return this.moneyTwo; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /release-notes/CREDITS-2.x: -------------------------------------------------------------------------------- 1 | Here are people who have contributed to the development of Jackson JSON processor 2 | Miscellaneous datatypes 3 | (version numbers in brackets indicate release in which the problem was fixed) 4 | 5 | Tatu Saloranta (tatu.saloranta@iki.fi): author of `org.json` (aka `json-org`), 6 | `jsr-353`, `[jakarta-]jsonp` modules, co-author of other modules 7 | 8 | Iurii Ignatko (welandaz@github): author of `joda-money` module (added in 2.11) 9 | 10 | Christopher Smith (chrylis@github): author of `jakarta-mail` module (added in 2.13) 11 | 12 | ---------------------------------------------------------------------------- 13 | 14 | Ryan Moquin 15 | 16 | * Reported #7: Jackson JSR353 library is using wrong module name for javax json api 17 | (2.12.1) 18 | 19 | Thiago Henrique Hüpner (Thihup@github) 20 | 21 | * Contributed #10: Add Jakarta JSON Processing module 22 | (2.12.2) 23 | * Contributed #12: (jsonp) Add alternate constructor in `JSONPModule`/`JSR353Module` 24 | to take `JsonProvider` 25 | (2.12.3) 26 | 27 | Christopher Smith (chrylis@github) 28 | 29 | * Contributed #16: Add datatype module for Jakarta Mail 30 | (2.13.0) 31 | 32 | Pascal van Eck (patveck@github) 33 | 34 | * Contributed #27: Deserializing a JSON Merge Patch fails when the input is 35 | not a JSON object 36 | (2.13.5 / 2.14.1) 37 | 38 | Andrzej Pańkowski (apankowski@github) 39 | 40 | * Contributed #17: Add configurable amount representations for Joda Money module 41 | (2.14.0) 42 | 43 | Matt Nelson (mattnelson@github) 44 | 45 | * Suggested #28: Add delegating serializers for `JsonPatch` and `JsonMergePatch` 46 | (2.14.2) 47 | 48 | PJ Fanning (@pjfanning) 49 | 50 | * Contributed #31/#32/#33: (jsonp/jsr-353) Fix issue with `BigInteger` handling 51 | (2.15.0) 52 | * Contributed #34: Upgrade `jakarta.json-api` dependency to 2.1.1 (from 2.0.0) 53 | (2.15.0) 54 | 55 | Konstantin Volivach (@kostya05983) 56 | * Contributed #37: (jsonp/jsr-353): Fix class path scaning on each deserialization 57 | (2.16.0) 58 | --------------------------------------------------------------------------------