Skip to main content

[json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-3) addArray methods in Builder

  • From: "illsleydc (JIRA)" < >
  • To:
  • Subject: [json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-3) addArray methods in Builder
  • Date: Sat, 26 May 2012 08:20:20 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


    [ 
http://java.net/jira/browse/JSON_PROCESSING_SPEC-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=340379#action_340379
 ] 

illsleydc commented on JSON_PROCESSING_SPEC-3:
----------------------------------------------

I definitely agree with the need for an addAll to JsonArrayBuilder, but I 
think it's worth exploring further and adding a few... (I don't know where a 
developer would normally be getting the Iterable<JsonValue> from?)

addAll(Iterable<String>), addAll(Iterable<Integer>), addAll(Iterable<Double>)

The obvious inefficiency here is for people with int[] or double[]. For them, 
addAll(int...) etc would be better. That could get to be a lot of methods, 
but with consistent naming, it might not feel too overwhelming.

> addArray methods in Builder 
> ----------------------------
>
>                 Key: JSON_PROCESSING_SPEC-3
>                 URL: http://java.net/jira/browse/JSON_PROCESSING_SPEC-3
>             Project: json-processing-spec
>          Issue Type: Improvement
>            Reporter: jitu
>            Assignee: jitu
>
> Feedback on addArray methods: "API already has beginArray() for starting a 
> new array, better to turn this into addAll(Iterable<JsonValue>) which would 
> add all the elements of the iterable at the current point.  That way 
> addAll() can do double-duty both to bulk-add into the currently built 
> array, or you can do .beginArray().addAll(iterable).endArray() to add a 
> nested array."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[json-processing-spec issues] [JIRA] Created: (JSON_PROCESSING_SPEC-3) addArray methods in Builder

jitu (JIRA) 05/21/2012

[json-processing-spec issues] [JIRA] Updated: (JSON_PROCESSING_SPEC-3) addArray methods in Builder

jitu (JIRA) 05/21/2012

[json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-3) addArray methods in Builder

illsleydc (JIRA) 05/26/2012
 
 
Close
loading
Please Confirm
Close