Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node with space in the middle of the key is not located #54

Open
m1h43l opened this issue Sep 17, 2021 · 4 comments
Open

Node with space in the middle of the key is not located #54

m1h43l opened this issue Sep 17, 2021 · 4 comments

Comments

@m1h43l
Copy link
Contributor

m1h43l commented Sep 17, 2021

Node with the key "city charter" is not located with jx_locate(json : 'city charter').

Unit test NOXDBUT3 test case TEST_KEY_WITH_SPACE.

@wimjongman
Copy link
Contributor

We run into this as well:

**free
Ctl-Opt BndDir('NOXDB') dftactgrp(*NO) ACTGRP('QILE' );

/include qrpgleref,JSONPARSER

dcl-s p2 pointer;
dcl-s txt varchar(50);

// fail
p2 = json_parseString('{"valid key": "test"}');
txt = json_getValue(p2:'valid key');
dsply txt;
json_delete(p2);

// success
p2 = json_parseString('{"validkey": "test"}');
txt = json_getValue(p2:'validkey');
dsply txt;
json_delete(p2);

*inlr = *on;      

@NielsLiisberg
Copy link
Collaborator

NielsLiisberg commented May 11, 2023 via email

@wimjongman
Copy link
Contributor

That does not work, unfortunately. Or I did not understand your instructions:

**free
Ctl-Opt BndDir('NOXDB') dftactgrp(*NO) ACTGRP('QILE' );

/include qrpgleref,JSONPARSER

dcl-s p2 pointer;
dcl-s txt varchar(50);

// fail
p2 = json_parseString('{"valid key": "test"}');
txt = json_getValue(p2:'"valid key"');
dsply txt;
json_delete(p2);

// success
p2 = json_parseString('{"validkey": "test"}');
txt = json_getValue(p2:'"validkey"');
dsply txt;
json_delete(p2);

*inlr = *on;    

@NielsLiisberg
Copy link
Collaborator

NielsLiisberg commented May 11, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants