0

How to pass an array to JSON string?

JSONStringer jsonStringer = new JSONStringer().object.key("key").value(value).key("key").array().value(arrayvalue).endArray().endObject

My problem is how can I pass arrayvalue here?

The value is:

"item1", "item2", "item3", "item4"..... "item100"

How can I do this?

2
  • you want to add this array string to JSON? Is that what you are asking Commented Dec 3, 2013 at 12:21
  • hi plz send me hall string of json Commented Dec 3, 2013 at 12:23

1 Answer 1

1

Check out the GSON library, I believe it will have what you need to easily solve this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.