Class WorldJsonMapper

java.lang.Object
technology.sola.ecs.io.json.WorldJsonMapper
All Implemented Interfaces:
technology.sola.json.mapper.JsonMapper<World>

@NullMarked public class WorldJsonMapper extends Object implements technology.sola.json.mapper.JsonMapper<World>
JsonMapper implementation for World.
  • Constructor Details

    • WorldJsonMapper

      public WorldJsonMapper(List<technology.sola.json.mapper.JsonMapper<? extends Component>> componentJsonMappers)
      Creates a new JsonWorldIo instance with desired JsonMappers.
      Parameters:
      componentJsonMappers - the JsonMappers to be used during mapping between JSON and World
  • Method Details

    • getObjectClass

      public Class<World> getObjectClass()
      Specified by:
      getObjectClass in interface technology.sola.json.mapper.JsonMapper<World>
    • toJson

      public technology.sola.json.JsonObject toJson(World world)
      Specified by:
      toJson in interface technology.sola.json.mapper.JsonMapper<World>
    • toObject

      public World toObject(technology.sola.json.JsonObject jsonObject)
      Specified by:
      toObject in interface technology.sola.json.mapper.JsonMapper<World>