Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import com.jayway.jsonpath.DocumentContext;
- import com.jayway.jsonpath.JsonPath;
- public class JSONMapper {
- public static void main(String[] args) throws Exception {
- DocumentContext jsonContext =
- JsonPath.parse("D:\Docs\search.json");
- List<String> accom=
- JsonPath.read("C:\Users\shashank.sinha\Desktop\search.json",
- "*.singleAccomViewData");
- System.out.println("accom value: " + accom);
- }
- Below is my JSON File:-
- {
- "searchResult": {
- "singleAccomViewData": null,
- "singleAccomSearch": false,
- "durationSelection": {
- "defaultDisplay": [
- 6,
- 7,
- 8,
- 9,
- 10
- ]
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement