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

Attributes in uppercase? #8

Closed
guillaumegarcia13 opened this issue Apr 13, 2014 · 3 comments
Closed

Attributes in uppercase? #8

guillaumegarcia13 opened this issue Apr 13, 2014 · 3 comments

Comments

@guillaumegarcia13
Copy link

The kernel implementation produces JSON with attributes in uppercase. As JavaScript is case-sensitive, it makes replacement of zJSON by Kernel implementation (or the contrary) cumbersome as it means handling these different cases of the frontend application.

Wouldn't it be nice to be able to specify whether you want the attributes in lowercase or in uppercase?

@se38 se38 added this to the zJSON Version 0.2.26 milestone Apr 13, 2014
@se38 se38 self-assigned this Apr 13, 2014
@se38
Copy link
Owner

se38 commented Apr 13, 2014

Should work now.
Can you please test "/trunk/test/CLAS.ZCL_JSON_DOCUMENT.slnk" and report back?

see Unit Test:
zcl_json_document=>transform_simple(
EXPORTING
data_in = ls_test
lower_case = abap_true
IMPORTING
json_out = json
).

cl_aunit_assert=>assert_equals( exp = '{"result":{"yyy":"Field 1","xxx":"123"}}'
                                act = json ).

@guillaumegarcia13
Copy link
Author

OMG you're fast! :)

Fine by me!
image

@se38
Copy link
Owner

se38 commented Apr 13, 2014

Ok, thank you.
Change will be included in the next version.

@se38 se38 closed this as completed Apr 13, 2014
@se38 se38 added the fixed label Apr 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants