com.github.bloodshura.ignitium.cfg.json.handling.JsonParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ignitium-cfg Show documentation
Show all versions of ignitium-cfg Show documentation
A collection of configuration and serialization readers and writers, like JSON, internationalization (I18n), and CSV.
package com.github.bloodshura.ignitium.cfg.json.handling;
import com.github.bloodshura.ignitium.cfg.json.JsonArray;
import com.github.bloodshura.ignitium.cfg.json.JsonObject;
import com.github.bloodshura.ignitium.cfg.json.JsonParseException;
import com.github.bloodshura.ignitium.cfg.json.JsonParseException.ErrorType;
import com.github.bloodshura.ignitium.cfg.json.handling.Token.Type;
import com.github.bloodshura.ignitium.collection.store.impl.XStack;
import com.github.bloodshura.ignitium.resource.Resource;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
import java.io.Reader;
public class JsonParser {
@Nullable
public static Object parse(@Nonnull Resource resource) throws IOException, JsonParseException {
try (Reader reader = resource.newReader()) {
Yylex lexer = new Yylex();
lexer.yyreset(reader);
XStack statuses = new XStack<>();
XStack
© 2015 - 2025 Weber Informatics LLC | Privacy Policy