[
https://issues.apache.org/jira/browse/OAK-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16095806#comment-16095806
]
Chetan Mehrotra commented on OAK-6476:
--------------------------------------
Done following changes
* Type would be inferred properly for jcr:primaryType and jcr:mixins property
names
* :childOrder property would be inferred by the order of entries in json in
case it is not explicitly defined. For this property is only inferred for
"nt:unstructured"
With this an index definition like below can be safely imported
{code:javascript}
{
"evaluatePathRestrictions": true,
"compatVersion": 2,
"type": "lucene",
"async": "async",
"jcr:primaryType": "oak:QueryIndexDefinition",
"indexRules": {
"jcr:primaryType": "nt:unstructured",
"dam:Asset": {
"jcr:primaryType": "nt:unstructured",
"properties": {
"jcr:primaryType": "nt:unstructured",
"valid": {
"name": "valid",
"propertyIndex": true,
"jcr:primaryType": "nt:unstructured",
"notNullCheckEnabled": true
},
"mimetype": {
"name": "mimetype",
"analyzed": true,
"jcr:primaryType": "nt:unstructured"
},
"lastModified": {
"ordered": true,
"name": "jcr:content/metadata/jcr:lastModified",
"jcr:primaryType": "nt:unstructured"
},
"status": {
"name": "jcr:content/metadata/status",
"propertyIndex": true,
"jcr:primaryType": "nt:unstructured"
}
}
}
}
}
{code}
> Support deserializing json as NodeState
> ---------------------------------------
>
> Key: OAK-6476
> URL: https://issues.apache.org/jira/browse/OAK-6476
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: store-spi
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Fix For: 1.8
>
> Attachments: OAK-6476-v1.patch
>
>
> Oak has JsonSerializer in oak-store-spi which supports serializing the
> NodeState as json (preserving the property types). For OAK-6471 I need a way
> to deserialize this json as NodeState.
> So I would like to implement a JsonDeserializer which does the reverse. This
> would be based on logic already implemented in
> [KernelNodeState|https://github.com/apache/jackrabbit-oak/blob/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)