Class MyNumberConverter


  • public abstract class MyNumberConverter
    extends java.lang.Object
    dsl-json number deserializers accept numbers wrapped in strings, which is not a desirable behaviour from my point of view. That's why this class was created, to overwrite that behaviour.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.math.BigDecimal parseDecimal​(com.dslplatform.json.JsonReader<?> reader)  
      static int parseInt​(com.dslplatform.json.JsonReader<?> reader)  
      static long parseLong​(com.dslplatform.json.JsonReader<?> reader)  
      • Methods inherited from class java.lang.Object

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

      • MyNumberConverter

        public MyNumberConverter()
    • Method Detail

      • parseInt

        public static int parseInt​(com.dslplatform.json.JsonReader<?> reader)
                            throws com.dslplatform.json.ParsingException
        Throws:
        com.dslplatform.json.ParsingException
      • parseLong

        public static long parseLong​(com.dslplatform.json.JsonReader<?> reader)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDecimal

        public static java.math.BigDecimal parseDecimal​(com.dslplatform.json.JsonReader<?> reader)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException