private void SerializeMemoryInspection(MemoryInspection memory, IFastJsonWriter writer) { writer.WriteStartObject(); writer.WriteProperty("type", "inspection:memory"); writer.WriteProperty("title", memory.Title); writer.WritePropertyStartArray("labels"); foreach (var label in memory.Labels) { SerializeMemoryInspectionLabel(writer, label); } writer.WriteEndArray(); writer.WritePropertyStartArray("data"); foreach (var @byte in memory.Data) { writer.WriteValue(@byte); } writer.WriteEndArray(); writer.WriteEndObject(); }
public void WriteMemory(MemoryInspection memory) { var writer = _stdoutWriter.StartJsonObjectLine(); writer.WriteString(Type, InspectionMemory); writer.WriteString(Title, memory.Title); writer.WriteStartArray(Labels); foreach (var label in memory.Labels) { WriteMemoryLabel(writer, label); } writer.WriteEndArray(); writer.WriteStartArray(Data); foreach (var @byte in memory.Data) { writer.WriteNumberValue(@byte); } writer.WriteEndArray(); _stdoutWriter.EndJsonObjectLine(); }