Answers for "convert array to json online"

PHP
10

php convert array to json object

$myArr = array("apple", "banana", "mango", "jackfruit");

$toJSON = json_encode($myArr);

echo $toJSON;
Posted by: Guest on June-18-2020
0

arraylist to json array

ArrayList<String> list = new ArrayList<String>();
list.add("foo");
list.add("baar");
JSONArray jsArray = new JSONArray(list);
Posted by: Guest on December-19-2020

Code answers related to "convert array to json online"

Browse Popular Code Answers by Language