class PrimitiveJsonNodeConverter implements ConditionalConverter<JsonNode, Object> {
  @Override
  public MatchResult match(Class<?> sourceType, Class<?> destinationType) {
    return (JsonNode.class.isAssignableFrom(sourceType)
        && !ContainerNode.class.isAssignableFrom(sourceType))
        ? MatchResult.FULL : MatchResult.NONE;
  }

  @Override
  public Object convert(MappingContext<JsonNode, Object> context) {<FILL_FUNCTION_BODY>}
}

    JsonNode source = context.getSource();
    if (source == null)
      return null;

    if (source.isNumber()) {
      MappingContext<?, ?> mappingContext = context.create(source.numberValue(), context.getDestinationType());
      return context.getMappingEngine().map(mappingContext);
    } else {
      MappingContext<?, ?> mappingContext = context.create(source.textValue(), context.getDestinationType());
      return context.getMappingEngine().map(mappingContext);
    }
  
<no_super_class>