You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2008/05/02 11:00:55 UTC
[jira] Created: (SLING-412) Inconsistent name handling when
importing json stuff
Inconsistent name handling when importing json stuff
----------------------------------------------------
Key: SLING-412
URL: https://issues.apache.org/jira/browse/SLING-412
Project: Sling
Issue Type: Bug
Components: JSON
Reporter: Carsten Ziegeler
Fix For: 2.0.0
The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594187#action_12594187 ]
Bertrand Delacretaz commented on SLING-412:
-------------------------------------------
Agree with removing this feature
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594143#action_12594143 ]
Carsten Ziegeler commented on SLING-412:
----------------------------------------
Yes, I think this is what needs to be fixed. Imagine I export node "A" which has a "name" property with value "B". My json of the export looks like this:
{
"name":"B"
}
Importing this by putting it into a file named "A.json" results in a new node named "B".
I think we should use an artifical property which is not allowed as a real property name, like we do in the sling post servlets (where we use ":name")
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593918#action_12593918 ]
Felix Meschberger commented on SLING-412:
-----------------------------------------
Do not quite understand this issue. It is true, the the "name" property is used for the top level node. But for any lower level nodes, only the JSON object name is used.
Probably the selection of the node name for the top level node in the JsonReader.parse method should be modified.
Maybe this may be fixed in the Loader.createNode(Node, String, URL, boolean) method which actually implements this behaviour for the top level node ?
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler reassigned SLING-412:
--------------------------------------
Assignee: Carsten Ziegeler
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-412.
----------------------------------
Resolution: Fixed
Removed in 653413
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594173#action_12594173 ]
Felix Meschberger commented on SLING-412:
-----------------------------------------
I would even consider dropping that "feature". It dates back to the days where we had the old-style JSON format.
So, the top level node would _always_ be named after the file name and _never_ will a name property (however it that property is named) be used.
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-412) Inconsistent name handling when
importing json stuff
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594186#action_12594186 ]
Carsten Ziegeler commented on SLING-412:
----------------------------------------
I'm fine with removing this feature completly as well. There could only be the case, when it is too difficult (not possible) to use the correct file name for the json file; but so far I don't see this as a problem atm; we can fix this when the problem arises.
> Inconsistent name handling when importing json stuff
> ----------------------------------------------------
>
> Key: SLING-412
> URL: https://issues.apache.org/jira/browse/SLING-412
> Project: Sling
> Issue Type: Bug
> Components: JSON
> Reporter: Carsten Ziegeler
> Fix For: 2.0.0
>
>
> The json importer looks for a property named "name" to use its value for a node name. Only if this is not available, the json object name is used as the node name.
> This is an inconsistent behaviour compared to a default json export. As soon as a node has a "name" property this value is used for the name. So exporting nodes with random name properties and importing same results in different node names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.