Class JsonParser

java.lang.Object
io.grpc.internal.JsonParser

public final class JsonParser extends Object
Parses JSON with as few preconceived notions as possible.
  • Field Details

    • logger

      private static final Logger logger
  • Constructor Details

    • JsonParser

      private JsonParser()
  • Method Details

    • parse

      public static Object parse(String raw) throws IOException
      Parses a json string, returning either a Map<String, ?>, List<?>, String, Double, Boolean, or null. Fails if duplicate names found.
      Throws:
      IOException
    • parseRecursive

      private static Object parseRecursive(com.google.gson.stream.JsonReader jr) throws IOException
      Throws:
      IOException
    • parseJsonObject

      private static Map<String,?> parseJsonObject(com.google.gson.stream.JsonReader jr) throws IOException
      Throws:
      IOException
    • parseJsonArray

      private static List<?> parseJsonArray(com.google.gson.stream.JsonReader jr) throws IOException
      Throws:
      IOException
    • parseJsonNull

      private static Void parseJsonNull(com.google.gson.stream.JsonReader jr) throws IOException
      Throws:
      IOException