ModelCodec

public final class ModelCodec


Encodes/Decodes JSON.

Summary

Public methods

static void

Adds a DeJSONFactory to intercept JSONObjects and replace them with more suitable types.

static Evaluation

Transforms a JSON string to an evaluation.

static String
encode(Object javaObject)

Encodes a Java Object into a JSON string.

static void

Removes a DeJSONFactory from the list of factories that transform JSONObjects to java objects.

Public methods

addDeJSONFactory

public static void addDeJSONFactory(JSONAble.DeJSONFactory dejson)

Adds a DeJSONFactory to intercept JSONObjects and replace them with more suitable types.

decodeEvaluation

public static Evaluation decodeEvaluation(String json)

Transforms a JSON string to an evaluation.

encode

public static String encode(Object javaObject)

Encodes a Java Object into a JSON string.

removeDeJSONFactory

public static void removeDeJSONFactory(JSONAble.DeJSONFactory dejson)

Removes a DeJSONFactory from the list of factories that transform JSONObjects to java objects.