use of org.apache.jena.atlas.json.JsonParseException in project jena by apache.
the class json method main.
public static void main(String... args) {
if (args.length == 0)
args = new String[] { "-" };
try {
for (String fn : args) {
JsonValue json = null;
try {
json = JSON.readAny(fn);
} catch (JsonParseException ex) {
String name = fn.equals("-") ? "<stdin>" : fn;
System.err.println(name + ": " + JsonParseException.formatMessage(ex.getMessage(), ex.getLine(), ex.getColumn()));
continue;
}
JSON.write(IndentedWriter.stdout, json);
IndentedWriter.stdout.ensureStartOfLine();
}
} finally {
IndentedWriter.stdout.flush();
}
}
Aggregations