IBMStreams / streamsx.json

Toolkit for working with JSON in SPL applications.
http://ibmstreams.github.io/streamsx.json/
Other
3 stars 19 forks source link

JSONToTuple shall support split/fused JSON strings #47

Closed m-kotowski closed 4 years ago

m-kotowski commented 8 years ago

a) A JSON string might be split into several parts that arrive as consecutive tuples at the JSONToTuple operator. For example, the JSON string is formatted with new lines and stored in a file that is read by a FileSource in line mode.

Example:

{ "book": {
   "title": "example book",
   "isbn": "abc"
}}

The operator shall be able to detect incomplete JSON strings and merge consecutive tuples to build a complete JSON string.

b) Several JSON strings might be fused into one string that arrives at the JSONToTuple operator.

Example:

{ "book": { "title": "example book", "isbn": "abc" }} { "book": { "title 2": "example book 2", "isbn": "abcd" }}

The operator shall consume as much as needed from the JSON string to emit a tuple, but shall continue parsing if more data is available in the string.

c) Both features shall be supported simultaneously. That means, a JSON string might arrive in consecutive tuples, but the last tuple might also contain the beginning of the next JSON strin

ddebrunner commented 8 years ago

+1