We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This occurs when the string is nested and more than one level deep, e.g it occurs for {"a": {"b": "[c-d]"}} but not {"b": "[c-d]"}
I'd expect the string "{"a": {"b": "[c-d]"}}" to be deserialized to: { "a" : { "b" : "[c-d]" } }
It's actually deserialized to: { "a" : { "b" : ["c-d"] } }
Here's a test for this that currently fails:
public void testElement_Object_nested() { JSONObject jsonObject1 = new JSONObject(); jsonObject1.element( "str", "\"[]\"" ); Assertions.assertTrue(jsonObject1.get( "str" ) instanceof String); // This assertion passes JSONObject jsonObject2 = new JSONObject(); jsonObject2.element( "obj", jsonObject1); Assertions.assertTrue(jsonObject2.getJSONObject( "obj" ).get( "str" ) instanceof String); // This assertion fails }
I'm running version 2.4.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This occurs when the string is nested and more than one level deep, e.g it occurs for
{"a": {"b": "[c-d]"}} but not {"b": "[c-d]"}
I'd expect the string "{"a": {"b": "[c-d]"}}" to be deserialized to:
{
"a" : {
"b" : "[c-d]"
}
}
It's actually deserialized to:
{
"a" : {
"b" : ["c-d"]
}
}
Here's a test for this that currently fails:
I'm running version 2.4.
The text was updated successfully, but these errors were encountered: