dependency tree gets populated.

This commit is contained in:
Norayr Chilingarian 2020-06-09 17:57:59 +04:00
parent 289c154f46
commit d8a2a9ddac
19 changed files with 229 additions and 707 deletions

28
tst/testJsonParser.Mod Normal file
View file

@ -0,0 +1,28 @@
MODULE testJsonParser;
IMPORT vpkJsonParser, Out;
VAR
jsonRecord: vpkJsonParser.JsonTypePointer;
testValue: ARRAY 128 OF CHAR;
keyFound: BOOLEAN;
BEGIN
jsonRecord := vpkJsonParser.Create("{'foo': 'bar', 'test': 'test1', 'test2': {'sub': 'dub'}}");
keyFound := jsonRecord.GetTerminal(jsonRecord, "foo", testValue);
IF keyFound THEN
Out.String('found KEY');
Out.String(testValue); Out.Ln;
ELSE
Out.String('Value for the Key is not found'); Out.Ln;
END;
keyFound := jsonRecord.GetTerminal(jsonRecord, "test2.sub", testValue);
IF keyFound THEN
Out.String('found KEY');
Out.String(testValue); Out.Ln;
ELSE
Out.String('Value for the Key is not found'); Out.Ln;
END;
END testJsonParser.