Details
-
Improvement
-
Status: Done
-
Minor
-
Resolution: Done
-
None
-
None
Description
For many use cases, the user may not have control over the format of the json that is coming in. Some services send 'documents' with many atomic json entries, that are not in a coherent array, and cannot be referenced or parsed.
It would be useful to simply have the option for the JSONMap parser to be configured to 'wrap' the incoming document in an array and holding entity. This would allow it to be parsed and addressed by JSONPath.
{data},
{data}
,
{data},wraps to:
{ "wrapName" : [
{data}
,
{data},{data}
]
}
that can be then referenced by a jsonPath statement : $.wrapperName[*] or something more complex
So you would configure the parser
wrapIncomming : 'true' # This wraps the incomming bytes in a json construct, { NAME : [ CONTENT ] }
.wrapContructName : 'messages' # default name for the wrapping construct, this name should be referenced in your jsonpath statement
The assumption here is that the entities, while not wrapped or in an array, are still comma separated.
Attachments
Issue Links
- links to