Skip to content

Instantly share code, notes, and snippets.

@AhnSeongHyun
Created March 4, 2013 15:34
Show Gist options
  • Save AhnSeongHyun/5083063 to your computer and use it in GitHub Desktop.
Save AhnSeongHyun/5083063 to your computer and use it in GitHub Desktop.
package com.ash84.test;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.Gson;
public class JsonMaker
{
public String toJson(String query, String category)
{
Gson gson = new Gson();
List<String> searchData = new ArrayList<String>();
searchData.add(query);
searchData.add(category);
return gson.toJson(searchData);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment