Class Pose2dDeserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<edu.wpi.first.math.geometry.Pose2d>
frc.robot.shared.config.Pose2dDeserializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider

public class Pose2dDeserializer extends com.fasterxml.jackson.databind.JsonDeserializer<edu.wpi.first.math.geometry.Pose2d>
Jackson deserializer for a Pose2d stored as JSON with fields x, y (meters), and rotation in degrees.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    edu.wpi.first.math.geometry.Pose2d
    deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context)
    Parses a Pose2d from JSON with fields x, y (meters), and rotation in degrees.

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pose2dDeserializer

      public Pose2dDeserializer()
  • Method Details

    • deserialize

      public edu.wpi.first.math.geometry.Pose2d deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext context) throws IOException
      Parses a Pose2d from JSON with fields x, y (meters), and rotation in degrees.
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<edu.wpi.first.math.geometry.Pose2d>
      Parameters:
      parser - Jackson parser positioned at the pose node
      context - deserialization context provided by Jackson
      Returns:
      pose built from the JSON values (rotation converted to radians)
      Throws:
      IOException - if the JSON cannot be read