You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@johnzon.apache.org by st...@apache.org on 2019/07/25 15:22:00 UTC
[johnzon] 02/02: JOHNZON-206 properly handle JsonValues in arrays
This is an automated email from the ASF dual-hosted git repository.
struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/johnzon.git
commit a9b615331b1e9830b8ce3b01ea2ec996c7f7c60b
Author: Mark Struberg <st...@apache.org>
AuthorDate: Thu Jul 25 17:20:49 2019 +0200
JOHNZON-206 properly handle JsonValues in arrays
txs to elexx for the report and unit test!
---
.../src/main/java/org/apache/johnzon/mapper/MappingGeneratorImpl.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/MappingGeneratorImpl.java b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/MappingGeneratorImpl.java
index f022562..1b7721e 100644
--- a/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/MappingGeneratorImpl.java
+++ b/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/MappingGeneratorImpl.java
@@ -569,6 +569,8 @@ public class MappingGeneratorImpl implements MappingGenerator {
if (valJsonPointer != null) {
// write the JsonPointer as String natively
generator.write(valJsonPointer);
+ } else if (o instanceof JsonValue) {
+ generator.write((JsonValue) o);
} else {
writeItem(itemConverter != null ? itemConverter.from(o) : o, ignoredProperties, isDeduplicateObjects ? new JsonPointerTracker(jsonPointer, i) : null);
}