[
https://issues.apache.org/jira/browse/OAK-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094536#comment-16094536
]
Chetan Mehrotra commented on OAK-6476:
--------------------------------------
Okie. Currently the json which can be imported looks like
{noformat}
{
"/oak:index/lucene": {
"compatVersion": 2,
"codec": "Lucene46",
"async": "offline-reindex-async",
"reindexCount": 3,
"reindex": false,
":version": 2,
"jcr:primaryType": "nam:oak:QueryIndexDefinition",
"excludedPaths": ["/var", "/etc/replication", "/etc/workflow/instances",
"/jcr:system"],
"async-previous": "fulltext-async",
"type": "lucene",
"indexRules": {
"jcr:primaryType": "nam:nt:unstructured",
":childOrder": ["nam:rep:Token", "nam:nt:base"],
"rep:Token": {
"jcr:primaryType": "nam:nt:unstructured",
":childOrder": ["nam:properties"],
"properties": {
"jcr:primaryType": "nam:nt:unstructured",
":childOrder": "[0]:Name"
}
},
"nt:base": {
"jcr:primaryType": "nam:nt:unstructured",
"includePropertyTypes": ["String", "Binary"],
":childOrder": ["nam:properties"],
"properties": {
"jcr:primaryType": "nam:nt:unstructured",
":childOrder": ["nam:analyticsProvider", "nam:analyticsSnippet",
"nam:hideInNav", "nam:offTime", "nam:onTime", "nam:allowedTemplates",
"nam:childrenOrder", "nam:cugEnabled", "nam:cugPrincipals", "nam:cugRealm",
"nam:designPath", "nam:isCancelledForChildren", "nam:isDeep",
"nam:lastModified", "nam:lastModifiedBy", "nam:lastPublished",
"nam:lastPublishedBy", "nam:lastReplicated", "nam:lastReplicatedBy",
"nam:lastReplicationAction", "nam:lastReplicationStatus", "nam:lastRolledout",
"nam:lastRolledoutBy", "nam:name", "nam:parentPath", "nam:segments",
"nam:siblingOrder", "nam:template", "nam:trigger", "nam:versionComment",
"nam:createdBy", "nam:lastModifiedBy_31", "nam:alias", "nam:vanityPath",
"nam:asyncstatus", "nam:asyncstart", "nam:asyncdone", "nam:runtimeId",
"nam:leaderElectionId", "nam:resourceType", "nam:resourceSuperType",
"nam:prop"],
"resourceSuperType": {
"jcr:primaryType": "nam:nt:unstructured",
"propertyIndex": true,
"weight": 0,
"name": "sling:resourceSuperType",
":childOrder": "[0]:Name"
},
{noformat}
Following aspects would need type assitance
# jcr:primaryType
# :childOrder
So I can expose some extension point to customize these parts. Like by default
convert jcr:primaryType and jcr:mixin to Name.
For child order would need support on both serializer and deserializer i.e.
serializer emits child in order and deserializer re constructs the child order
from json order. Would it be fine to implement it after initial commit of this
patch?
> 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)