skip to main content

Internal Objects : JSONStream Class (com.iscobol.rts.JSONStream) : readFromString

readFromString
Reads a JSON stream and puts its content in the data item associated with the JSONStream object.
General format
void readFromString ( Json-Source )
Syntax rules
1.
Json-Source is an object reference to java.lang.String.
General rules
1.
When the read method is invoked, the whole content of Json-Source is read and the data item associated with the JSONStream object is updated.
 
NOTE - If the number of occurrences of a JSON field is not known at the time the program is written, specifying the DYNAMIC phrase of the OCCURS clause in the data item associated with the JSONStream object is recommended.
Code example
configuration section.
    class jsonStream  as "com.iscobol.rts.JSONStream"
    class JString    as "java.lang.String"
working-storage section.
77 objJsonStream object reference jsonStream.
77 objString    object reference JString.
procedure division.
objJsonStream:>readFromString(objString)

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left