com.jayway.jsonpath.spi.impl.JsonSmartProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-path Show documentation
Show all versions of json-path Show documentation
Java port of Stefan Goessner JsonPath.
package com.jayway.jsonpath.spi.impl;
import com.jayway.jsonpath.InvalidJsonException;
import com.jayway.jsonpath.spi.JsonProvider;
import com.jayway.jsonpath.spi.Mode;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONAware;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import java.util.List;
import java.util.Map;
/**
* Created by IntelliJ IDEA.
* User: kallestenflo
* Date: 11/8/11
* Time: 3:56 PM
*/
public class JsonSmartProvider extends JsonProvider {
private Mode mode;
private JSONParser parser;
public JsonSmartProvider() {
this(Mode.SLACK);
}
public JsonSmartProvider(Mode mode) {
this.mode = mode;
this.parser = new JSONParser(mode.intValue());
}
public Map createMap() {
return new JSONObject();
}
public List