[#6616] - Some valid JSON property names not supported

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
2

It is valid JSON to have something like this:-

{
"results": [
{
"uri": "someuri", "metadata": [ {"{http://somens.org/my}elementName": "my element value", "somethingelse": "othervalue"}, { ... } ]
},
{ ... }
]
}

Trying to extract results.metadata.{http://somens.org/my}elementName in the extension though returns no value, even if escaped.

Please add support for all valid JSON identifiers, even weird-but-valid ones like the above.

This bug prevents underlying XML data from being described accurately in a JSON payload. I regard it as a bug because such a JSON property name is valid as encoded in quotes, like the above.

Thanks!

v0.9
adamfowleruk's picture
Joined: Dec 11 2015 - 7:20am
Last seen: 5 years 1 month ago

1 Comment:

#1

Hi,

is it necessary to somehow escape some special characters in attribute name like in below example ("labels"."x/y")?

Data:
{
"name": "some-name",
"labels": {
"x/y": "prod"
}
}

Report definition:
...
<queryString language="WebServiceQuery">
<![CDATA[{
"getparameters" : { },
"fields" : [ {
"name" : "field",
"expression" : "labels.x/y"
} ],
"options" : {
"contentType" : "application/json",
"rootPath" : "",
"baseUrl" : ""
},
"headersMap" : {},
"queryData" : "",
"GETParameters" : { }
}]]>
</queryString>
...

In report as values i getting nulls.

Regards,
N.

Feedback