com.google.caliper
Class Json
java.lang.Object
com.google.caliper.Json
public final class Json
- extends Object
Ordinarily serialization should be done within the class that is being serialized. However,
many of these classes are used by GWT, which dies when it sees Gson.
getGsonInstance
public static com.google.gson.Gson getGsonInstance()
measurementSetToJson
public static String measurementSetToJson(MeasurementSet measurementSet)
measurementSetFromJson
public static MeasurementSet measurementSetFromJson(String measurementSetJson)
- Attempts to extract a MeasurementSet from a string, assuming it is JSON. If this fails, it
tries to extract it from the string assuming it is a space-separated list of double values.
measurementSetFromJson
public static MeasurementSet measurementSetFromJson(com.google.gson.JsonObject measurementSetJson)
Copyright © 2009-2011 Google, Inc.. All Rights Reserved.