We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Execute following code:
LazyArray records = new LazyArray("[{\"id\": \"20\"}]"); LazyArray activities = new LazyArray("[{\"id\": \"30\"}]"); LazyArray tmp = new LazyArray(); for (int i = 0; i < records.length(); i++) { tmp.put(records.getJSONObject(i)); } for (int i = 0; i < activities.length(); i++) { tmp.put(activities.getJSONObject(i)); } System.out.println("-- tmp (no pad) -- "); System.out.println(tmp.length()); System.out.println(tmp.toString()); System.out.println("-- tmp (with padding) -- "); System.out.println(tmp.length()); System.out.println(tmp.toString(2)); System.out.println("-- records (no pad) -- "); System.out.println(records.length()); System.out.println(records.toString()); System.out.println("-- records (with padding) -- "); System.out.println(records.length()); System.out.println(records.toString(2)); System.out.println("-- activities -- "); System.out.println("-- activities (no pad) -- "); System.out.println(activities.length()); System.out.println(activities.toString()); System.out.println("-- activities (with padding) -- "); System.out.println(activities.length()); System.out.println(activities.toString(2));
Output:
-- tmp (no pad) -- 2 [{"id": "20"},{"id": "30"}] -- tmp (with padding) -- 2 [ { "id":"20" }, { "id":"30" } ] -- records (no pad) -- 1 [{"id": "20"}] -- records (with padding) -- 1 [ { "id":"20" }, { "id":"30" } ] -- activities -- -- activities (no pad) -- 1 [{"id": "30"}] -- activities (with padding) -- 1 [ { "id":"30" } ]
The output for the records (with padding) is wrong: length = 1 is correct but extra entry added when padded !?
-- records (with padding) -- 1 [ { "id":"20" }, { "id":"30" } ]
Any ideas ho to solve ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Execute following code:
Output:
The output for the records (with padding) is wrong: length = 1 is correct but extra entry added when padded !?
Any ideas ho to solve ?
The text was updated successfully, but these errors were encountered: