public Map<String, Object> toMap() throws IOException { if (isNextObject()) { return readObject(this); } Map<String, Object> result = new LinkedHashMap<>(); while (hasNext()) { String name = nextName(); if (isNextNull()) { skipNext(); result.put(name, null); } else if (isNextObject()) { result.put(name, readObject(this)); } else if (isNextList()) { result.put(name, readList(this)); } else { result.put(name, nextScalar(true)); } } return result; }
public Object nextScalar(boolean optional) throws IOException { checkNextValue(optional); if (isNextNull()) { skipNext(); return null; } else if (isNextBoolean()) { return nextBoolean(false); } else if (isNextNumber()) { return new BigDecimal(nextString(false)); } else { return nextString(false); } }
errors = readResponseErrors(responseStreamReader); } else { responseStreamReader.skipNext();
public Map<String, Object> toMap() throws IOException { if (isNextObject()) { return readObject(this); } Map<String, Object> result = new LinkedHashMap<>(); while (hasNext()) { String name = nextName(); if (isNextNull()) { skipNext(); result.put(name, null); } else if (isNextObject()) { result.put(name, readObject(this)); } else if (isNextList()) { result.put(name, readList(this)); } else { result.put(name, nextScalar(true)); } } return result; }
public Map<String, Object> toMap() throws IOException { if (isNextObject()) { return readObject(this); } Map<String, Object> result = new LinkedHashMap<>(); while (hasNext()) { String name = nextName(); if (isNextNull()) { skipNext(); result.put(name, null); } else if (isNextObject()) { result.put(name, readObject(this)); } else if (isNextList()) { result.put(name, readList(this)); } else { result.put(name, nextScalar(true)); } } return result; }
public Object nextScalar(boolean optional) throws IOException { checkNextValue(optional); if (isNextNull()) { skipNext(); return null; } else if (isNextBoolean()) { return nextBoolean(false); } else if (isNextNumber()) { return new BigDecimal(nextString(false)); } else { return nextString(false); } }
public Object nextScalar(boolean optional) throws IOException { checkNextValue(optional); if (isNextNull()) { skipNext(); return null; } else if (isNextBoolean()) { return nextBoolean(false); } else if (isNextNumber()) { return new BigDecimal(nextString(false)); } else { return nextString(false); } }
errors = readResponseErrors(responseStreamReader); } else { responseStreamReader.skipNext();
errors = readResponseErrors(responseStreamReader); } else { responseStreamReader.skipNext();