MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / WriteJson

Method WriteJson

Source/Engine/Serialization/Stream.cpp:769–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767}
768
769void WriteStream::WriteJson(ISerializable* obj, const void* otherObj)
770{
771 WriteInt32(FLAXENGINE_VERSION_BUILD);
772 if (obj)
773 {
774 rapidjson_flax::StringBuffer buffer;
775 CompactJsonWriter writer(buffer);
776 writer.StartObject();
777 obj->Serialize(writer, otherObj);
778 writer.EndObject();
779
780 WriteInt32((int32)buffer.GetSize());
781 WriteBytes((byte*)buffer.GetString(), (int32)buffer.GetSize());
782 }
783 else
784 WriteInt32(0);
785}
786
787void WriteStream::WriteJson(const StringAnsiView& json)
788{

Callers

nothing calls this directly

Calls 8

WriteInt32Function · 0.85
StartObjectMethod · 0.45
SerializeMethod · 0.45
EndObjectMethod · 0.45
GetSizeMethod · 0.45
GetStringMethod · 0.45
LengthMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected