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

io.github.endreman0.javajson.Parser Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package io.github.endreman0.javajson;

import io.github.endreman0.javajson.nodes.Node;

/**
 * The old JSON parser. JSON parsing methods have been moved to the {@link JavaJson} class.
 * @author endreman0
 * @deprecated Use {@link JavaJson} instead.
 */
@Deprecated
public class Parser{
	/**
	 * Parse a JSON node from a string.
	 * 
	 * The passed string can be any JSON node: boolean, number, string, null, object, or array.
	 * 
	 * If an invalid string is passed in, two things could happen:
	 * 
    *
  • If the first character of the string does not match any known JSON node, null will be returned.
  • *
  • If the first character matches a node, but there is an error somewhere else in the the string, an IllegalArgumentException will be thrown.
  • *
* @param json the string to parse * @return the parsed node, or null if error * @throws IllegalArgumentException if error */ public static Node parse(String json){ return JavaJson.parse(json); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy