Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a side effect of the conversion: The order of keys is always sorted after converting,
![image](https://user-images.githubusercontent.com/16676760/66691902-5bd9e180-eccc-11e9-96f5-e64a6dc6b2c9.png)
Reason: /UI2/CL_JSON->GENERATE_INT use a SORTED table LT_FILEDS to process data.
In order to keep ABAP components order same as the original order of JSON data, the data type of LT_FILEDS should be HASHED table.
ZUI2_JSON is a class copied from /UI2/CL_JSON. And the LT_FILEDS in ZUI2_JSON is hashed table, so it can keep original order when converting. All occurrences of /UI2/CL_JSON in report ZJSON2ABAPTYPE is replaced by ZUI2_JSON now,
![image](https://user-images.githubusercontent.com/16676760/66691975-d440a280-eccc-11e9-89fc-9c80ae91d79d.png)
It is important to ensure that ZUI2_JSON has the same behavior in other respects. The local test classes copied form /UI2/CL_JSON guarantee that ZUI2_JSON works as good as /UI2/CL_JSON,
![image](https://user-images.githubusercontent.com/16676760/66692191-8036bd80-ecce-11e9-846a-6be16d80d556.png)
ZUI2_DATA_ACCESS is another class introduced in this commit, it is necessary for unit tests.