--- JSON-XS/README 2016/02/26 21:46:45 1.40 +++ JSON-XS/README 2016/11/16 19:21:53 1.41 @@ -678,10 +678,10 @@ And finally, in list context, it will try to extract as many objects from the stream as it can find and return them, or the empty list - otherwise. For this to work, there must be no separators between the - JSON objects or arrays, instead they must be concatenated - back-to-back. If an error occurs, an exception will be raised as in - the scalar context case. Note that in this case, any + otherwise. For this to work, there must be no separators (other than + whitespace) between the JSON objects or arrays, instead they must be + concatenated back-to-back. If an error occurs, an exception will be + raised as in the scalar context case. Note that in this case, any previously-parsed JSON texts will be lost. Example: Parse some JSON arrays/objects in a given string and return @@ -699,6 +699,10 @@ exception, you can also call this method before having parsed anything. + That means you can only use this function to look at or manipulate + text before or after complete JSON objects, not while the parser is + in the middle of parsing a JSON object. + This function is useful in two cases: a) finding the trailing text after a JSON object or b) parsing multiple JSON objects separated by non-JSON text (such as commas). @@ -1483,7 +1487,7 @@ INTEROPERABILITY WITH OTHER MODULES "JSON::XS" uses the Types::Serialiser module to provide boolean constants. That means that the JSON true and false values will be - comaptible to true and false values of iother modules that do the same, + comaptible to true and false values of other modules that do the same, such as JSON::PP and CBOR::XS. INTEROPERABILITY WITH OTHER JSON DECODERS @@ -1507,7 +1511,7 @@ invalid) JSON syntax for serialised objects, and you still want to decode the generated When you want to serialise objects, you can run a regex to replace the tagged syntax by standard JSON arrays (it only - works for "normal" packagesnames without comma, newlines or single + works for "normal" package names without comma, newlines or single colons). First, the readable Perl version: # if your FREEZE methods return no values, you need this replace first: @@ -1551,14 +1555,14 @@ both the original JSON specification on www.json.org and RFC4627. As far as I can see, you can get partial compatibility when parsing by - using "->allow_nonref". However, consider thew security implications of + using "->allow_nonref". However, consider the security implications of doing so. I haven't decided yet when to break compatibility with RFC4627 by default (and potentially leave applications insecure) and change the default to follow RFC7159, but application authors are well advised to call "->allow_nonref(0)" even if this is the current default, if they - cannot handle non-reference values, in preparation for the day when the4 + cannot handle non-reference values, in preparation for the day when the default will change. THREADS