
com.neuronrobotics.bowlerstudio.scripting.JsonRunner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BowlerScriptingKernel Show documentation
Show all versions of BowlerScriptingKernel Show documentation
A command line utility for accsing the bowler framework.
package com.neuronrobotics.bowlerstudio.scripting;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
public class JsonRunner implements IScriptingLanguage {
//Create the type, this tells GSON what datatypes to instantiate when parsing and saving the json
private static Type TT_mapStringString = new TypeToken>>() {
}.getType();
//chreat the gson object, this is the parsing factory
private static Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
@Override
public Object inlineScriptRun(File code, ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy