readFromFile
Reads a JSON file and puts its content in the data item associated with the JSONStream object.
General format
void readFromFile ( Json-Source )
Syntax rules
1. Json-Source can be either a Data Item or a Nonnumeric Literal.
General rules
1. Json-Source refers to a regular disk file.
2. 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 an 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.
3. The following escapes are allowed: \b, \f, \n, \r, \t, \" and \\. Any other character preceeded by a backslash is considered invalid and makes the read fail unless you set iscobol.jsonstream.allow_backslash_escaping_any_character (boolean) to true in the configuration.
Code example
...
configuration section.
repository
    class jsonStream  as "com.iscobol.rts.JSONStream"
    .
...
working-storage section.
...
77 objJsonStream object reference jsonStream.
...
procedure division.
...
objJsonStream:>readFromFile("Sample.json")
...