Guest User

Untitled

a guest
Jan 22nd, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. {
  2. "ADDTNLINFO":
  3. {
  4. "Tag":
  5. {
  6. "name": "a",
  7. "value": "10"
  8. },
  9. "Tag":
  10. {
  11. "name": "a b",
  12. "value": "20"
  13. },
  14. "Tag":
  15. {
  16. "name": "a b c",
  17. "value": "30"
  18. }
  19. }
  20. }
  21.  
  22. import com.google.gson.Gson;
  23. List<Dto> beans = service.something();
  24. Gson gson = new Gson();
  25. // convert your list to json
  26. String jsonCartList = gson.toJson(beans);
Add Comment
Please, Sign In to add comment