Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. import com.jayway.jsonpath.DocumentContext;
  4. import com.jayway.jsonpath.JsonPath;
  5.  
  6. public class JSONMapper {
  7.  
  8. public static void main(String[] args) throws Exception {
  9.  
  10. DocumentContext jsonContext =
  11. JsonPath.parse("D:\Docs\search.json");
  12. List<String> accom=
  13. JsonPath.read("C:\Users\shashank.sinha\Desktop\search.json",
  14. "*.singleAccomViewData");
  15. System.out.println("accom value: " + accom);
  16. }
  17.  
  18. Below is my JSON File:-
  19.  
  20. {
  21. "searchResult": {
  22. "singleAccomViewData": null,
  23. "singleAccomSearch": false,
  24. "durationSelection": {
  25. "defaultDisplay": [
  26. 6,
  27. 7,
  28. 8,
  29. 9,
  30. 10
  31. ]
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement