@Nullable ErrorVars errorVars) {
Preconditions.checkArgument(Collections.frequency(
ImmutableList.of(liveClientVars != null, staticClientVars != null, errorVars != null),
true) == 1,
"%s/%s/%s", liveClientVars, staticClientVars, errorVars);
ClientVarsGsonImpl clientVars = new ClientVarsGsonImpl();
if (liveClientVars != null) {
clientVars.setLiveClientVars(liveClientVars);
} else if (staticClientVars != null) {
clientVars.setStaticClientVars(staticClientVars);
} else {
clientVars.setErrorVars(errorVars);
}
String jsonString = GsonProto.toJson(clientVars);
try {
// TODO(ohler): Find a way to embed a GSON-generated JSON literal in GXP
// without serializing and re-parsing to org.json.JSONObject. Perhaps