I'm working with a json stream that requires decoding to extract complete json parts. The stream is in the following format:
{"a":1, "b":2}{"c":2,"e":3, "x":"eff"}{"3":4}
The regex pattern {([^}]+)}
is able to extract complete groups as shown below:
{"a":1, "b":2}` & `{"c":2,"e":3, "x":"eff"}
An issue I'm encountering is that the string data may contain { or } characters which are always enclosed within double quotes (").
For example:
{"a":1, "b":2}{"c":2,"e":3, "x":"ab{cd}efg"}
Is there a way to create a regex pattern that splits this into groups like so?
{"a":1, "b":2}` and `{"c":2,"e":3, "x":"ab{cd}efg"}`