EntitySerializer.md

July 25, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.Serialize

EntitySerializer Class

Enables serialization of entities to / from JSON. See Example.

public sealed class EntitySerializer

Inheritance System.Object ๐Ÿก’ EntitySerializer

Methods
ReadEntities(List<DataEntity>, Stream)Reads the JSON array of the given stream into the passed entities list.
ReadIntoStore(EntityStore, Stream)Reads the JSON array of the given stream into the passed store.
ReadIntoStoreAsync(EntityStore, Stream)Asynchronously reads the JSON array of the given stream into the passed store.
WriteEntities(IEnumerable<Entity>, Stream)Writes the given entities as a JSON array to the passed stream.
WriteEntity(Entity)Returns a JSON object of the passed entity as a string.
WriteStore(EntityStore, Stream)Writes all entities in the given store as a JSON array to the passed stream.
WriteStoreAsync(EntityStore, Stream)Asynchronously writes all entities in the given store as a JSON array to the passed stream.