Class CoordsDeserializer

java.lang.Object
megamek.common.jacksonAdapters.CoordsDeserializer

public class CoordsDeserializer extends Object
  • Method Details

    • parseNode

      public static Coords parseNode(com.fasterxml.jackson.databind.JsonNode coordsNode)
      Returns a parsed Coords from the given node. Note that 1 is subtracted from the x and y values so that a coords given as [ 3, 3 ] is the hex 0303 (rather than 0202) on the board when the grid numbers are shown.
      Parameters:
      coordsNode - The Json node to parse; it should be either an array of two values or have x: and y: nodes.
      Returns:
      The parsed coords