[ 
https://issues.apache.org/jira/browse/SLING-3368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13890717#comment-13890717
 ] 

Nicolas Peltier commented on SLING-3368:
----------------------------------------

Hi,

note that toMap is not called getMap :-), it's meant to be a conversion method. 
Implementation is a getter then, i agree.

I've contributed this because i've been a lot of time aching to manipulate 
JSONObject & JSONArray in a simple way. I agree this gives opportunities to 
mess up an object, but the API doesn't guarantee that, it can be strenghtened 
later on (or now if you think it's still worth it).

> Add toMap & iterable to resp. JSONObject and JSONArray
> ------------------------------------------------------
>
>                 Key: SLING-3368
>                 URL: https://issues.apache.org/jira/browse/SLING-3368
>             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 classes.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to