Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name Sensitivity to word "Content" as the JSON property name #344

Closed
NavidHeydari opened this issue Jun 1, 2017 · 2 comments
Closed

Name Sensitivity to word "Content" as the JSON property name #344

NavidHeydari opened this issue Jun 1, 2017 · 2 comments

Comments

@NavidHeydari
Copy link

Hi Devs,
Appreciate your efforts so far.

it seems something is sensitive to word "content" inside my JSON since whenever I tried to use this name inside my json and call XML to convert that into XML, it will treat my data in an odd way, for example:

"parent": [
{
"content" : "mydata",
"anotherProperty" : 12
}, {
"content" : "mydata1",
"anotherProperty" : 13
}
]

it will generate something like this:

mydata12mydata113

I assume it should produce something like this:

mydata12
mydata113

am I doing something wrong?
I should mention that my code is working fine with all the other properties, just it seems something is sensitive to content name.

Thanks for your efforts,
Navid :)

@johnjaylward
Copy link
Contributor

johnjaylward commented Jun 1, 2017

Yes, that is as-designed. the "content" tag is used to note CDATA sections of the XML

@stleary
Copy link
Owner

stleary commented Jun 8, 2017

The XML transformations are understood to be problematic and imperfect. It is unfortunate that a common word like 'content' is used here, but no changes to this part of the XML code are anticipated, due to the likelihood that it would break existing applications. Maintaining backwards compatibility is one of the highest priorities for this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants