You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/07/20 11:57:00 UTC

[jira] [Comment Edited] (OAK-6476) Support deserializing json as NodeState

    [ https://issues.apache.org/jira/browse/OAK-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094578#comment-16094578 ] 

Thomas Mueller edited comment on OAK-6476 at 7/20/17 11:56 AM:
---------------------------------------------------------------

[~chetanm] is ":childOrder" actually needed? In my view, this is redundant information. The Json parser used will return the entries in the order they are specified, and I guess the serializer does the same. If we need to support it, then I wonder what happens if somebody manually changes the Json (using a text file) and for example renames a child. So we would need to add checks for that as well...

Update: ah, I understand you also want to avoid that... Yes, I would very much prefer that.

Implementing it afterwards is fine for me, as long as we track it.


was (Author: tmueller):
[~chetanm] is ":childOrder" actually needed? In my view, this is redundant information. The Json parser used will return the entries in the order they are specified, and I guess the serializer does the same. If we need to support it, then I wonder what happens if somebody manually changes the Json (using a text file) and for example renames a child. So we would need to add checks for that as well...

> 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)