title: How to use Jackson DataType: JSR310 Deser standalone?
body: <p>I'm in a scenario where I'm converting from type <code>A</code> to type <code>B</code>. Type <code>A</code> has a date field which is of type <code>YearMonth</code>, and type <code>B</code>'s date field is a <code>String</code>. I don't want to reinvent the wheel, so it'd be great if I could use The Jackson DataType JSR310 library for this conversion.</p>
  
  <p>However, I'm quite confused how I can use the <code>YearMonthSerializer</code>'s public <code>serialize</code> method in a standalone way; same goes for <code>YearMonthDeserializer</code>'s public <code>deserialize</code> method.</p>
  
  <p><code>serialize</code> takes in a <code>YearMonth</code> (fine) alonside a <code>JsonGenerator</code> and <code>SerializationProvider</code> (what?) which I'm not sure how to retrieve, whereas <code>derialize</code> doesn't even have a <code>String</code> as an argument, just a <code>JsonParser</code> and <code>DeserializationContext</code>. </p>
  
  <p>I don't want to use this library in the typical way <code>@JsonSerialize(using = YearMonthSerializer.class)</code> because I'm not converting an entire POJO to a JSON sting, just one <code>YearMonth</code> field to a <code>String</code>.</p>
  
  <p>Based on these APIs though it almost looks like I am definitely not intended to use the library in this desired way.</p>
  
  <p><a href="https://static.javadoc.io/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.7.2/com/fasterxml/jackson/datatype/jsr310/ser/YearMonthSerializer.html" rel="nofollow noreferrer">Here</a>'s a link to the javadoc.</p>