Skip to content

Commit 458e687

Browse files
JsonToNative: add ExternalPropertyType enum #268
1 parent f447cb4 commit 458e687

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

objectbox-java-api/src/main/java/io/objectbox/annotation/ExternalPropertyType.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,21 @@ public enum ExternalPropertyType {
112112
* Representing type: String
113113
*/
114114
JAVASCRIPT,
115+
/**
116+
* A JSON string that is converted to a native "complex" representation in the external system.
117+
* <p>
118+
* For example in MongoDB, embedded/nested documents are converted to a JSON string in ObjectBox and vice versa.
119+
* This allows a quick and simple way to work with non-normalized data from MongoDB in ObjectBox. Alternatively, you
120+
* can use {@link #FLEX_MAP} and {@link #FLEX_VECTOR} to map to language primitives (e.g. maps with string keys; not
121+
* supported by all ObjectBox languages yet).
122+
* <p>
123+
* For MongoDB, (nested) documents and arrays are supported.
124+
* <p>
125+
* Note that this is very close to the internal representation, e.g. the key order is preserved (unlike Flex).
126+
* <p>
127+
* Representing type: String
128+
*/
129+
JSON_TO_NATIVE,
115130
/**
116131
* A vector (array) of Int128 values.
117132
*/

0 commit comments

Comments
 (0)