return gson.toJson(message.toGson(null, gson));
case MULTISTAGE:
RawStringData data = new RawStringData();
JsonElement rootElement = message.toGson(data, gson);
data.setBaseStringIndex(data.addString(gson.toJson(rootElement)));
return data.serialize();
default:
throw new AssertionError("Unknown JsonStrategy: " + strategy);
}
}