All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qiniu.service.line.JsonStrParser Maven / Gradle / Ivy

There is a newer version: 8.4.8
Show newest version
package com.qiniu.service.line;

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.qiniu.service.interfaces.ILineParser;

import java.io.IOException;
import java.util.*;

public class JsonStrParser implements ILineParser {

    private JsonObjParser jsonObjParser;

    public JsonStrParser(Map indexMap) throws IOException {
        this.jsonObjParser = new JsonObjParser(indexMap, false);
    }

    public Map getItemMap(String line) throws IOException {
        JsonObject parsed = new JsonParser().parse(line).getAsJsonObject();
        return jsonObjParser.getItemMap(parsed);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy