sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Edelson (JIRA)" <>
Subject [jira] [Commented] (SLING-3368) Add toMap & iterable to resp. JSONObject and JSONArray
Date Tue, 04 Feb 2014 13:54:09 GMT


Justin Edelson commented on SLING-3368:

A simple solution would be to wrap the map/list object in Collections.unmodifyableXXX(). My
guess is that the primary use case for these additions are for read-only access.

FWIW, I think these additions are useful (at least for read access), especially in a scripting
context as many scripting languages have native support for maps and iterators. I don't share
[~fmeschbe] 's sense of fealty to the original org.json code :)

> Add toMap & iterable to resp. JSONObject and JSONArray
> ------------------------------------------------------
>                 Key: SLING-3368
>                 URL:
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>            Reporter: Nicolas Peltier
>            Priority: Minor
>         Attachments: [json]_add_other_ways_to_use_JSONArray_and_JSONObject.patch
> Map JSONObject.toMap and JSONArray implementing Iterable allows better usage of those

This message was sent by Atlassian JIRA

View raw message