in src/org/jetbrains/plugins/ipnb/format/IpnbParser.java [842:874]
public JsonElement serialize(OutputDataRaw cellRaw, Type typeOfSrc, JsonSerializationContext context) {
final JsonObject jsonObject = new JsonObject();
if (cellRaw.png != null) {
jsonObject.addProperty("image/png", cellRaw.png);
}
if (cellRaw.html != null) {
final JsonElement html = gson.toJsonTree(cellRaw.html);
jsonObject.add("text/html", html);
}
if (cellRaw.svg != null) {
final JsonElement svg = gson.toJsonTree(cellRaw.svg);
jsonObject.add("image/svg+xml", svg);
}
if (cellRaw.jpeg != null) {
final JsonElement jpeg = gson.toJsonTree(cellRaw.jpeg);
jsonObject.add("image/jpeg", jpeg);
}
if (cellRaw.latex != null) {
final JsonElement latex = gson.toJsonTree(cellRaw.latex);
jsonObject.add("text/latex", latex);
}
if (cellRaw.markdown != null) {
final JsonElement markdown = gson.toJsonTree(cellRaw.markdown);
jsonObject.add("text/markdown", markdown);
}
if (cellRaw.text != null) {
final JsonElement text = gson.toJsonTree(cellRaw.text);
jsonObject.add("text/plain", text);
}
return jsonObject;
}