This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
According to the documentation, it seemed like the RandomAccessJSONReader would have allowed me to read through objects without having to go through from the Root Path. So what I did was this below:
The BeginObjectWithName seems to work and says that there is one child under "result". However the ReadStringWithName part always ends with a not found status.
I was able to make this work by using #JsonRandomAccessReader.ReadStringWIthPath( 'operation/result/status' '' #STD_TEXT ).asNativeString instead but would like to understand why the ReadStringWIthName code did not work.
Were you ever able to figure out how the _RandomAccessJsonReader works without having to specify the paths or objects?
I have a similar case where it sure would be easier to just state the name for the value you want.
jan wrote: Wed Feb 06, 2019 6:54 pm
@tsupartono thanks for the response. That is what I did eventually and it did work.
However, I thought there was a way for the reader to read specific strings without having to specify the paths or objects.