sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Peltier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-3368) Add toMap & iterable to resp. JSONObject and JSONArray
Date Tue, 04 Feb 2014 14:26:09 GMT

    [ 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)

Mime
View raw message