Package org.tomlj

Class JsonSerializer


  • final class JsonSerializer
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JsonSerializer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void append​(java.lang.Appendable appendable, int indent, java.lang.String line)  
      private static void appendLine​(java.lang.Appendable appendable, java.lang.String line)  
      private static void appendTomlValue​(java.lang.Object value, java.lang.Appendable appendable, java.util.Set<JsonOptions> options, int indent)  
      private static void appendTomlValueLiteral​(TomlType tomlType, java.lang.Object value, java.lang.Appendable appendable, java.util.Set<JsonOptions> options)  
      private static java.lang.StringBuilder escape​(java.lang.String text)  
      private static void indentLine​(java.lang.Appendable appendable, int indent)  
      (package private) static void toJson​(TomlArray array, java.lang.Appendable appendable, java.util.Set<JsonOptions> options)  
      private static void toJson​(TomlArray array, java.lang.Appendable appendable, java.util.Set<JsonOptions> options, int indent)  
      (package private) static void toJson​(TomlTable table, java.lang.Appendable appendable, java.util.Set<JsonOptions> options)  
      private static void toJson​(TomlTable table, java.lang.Appendable appendable, java.util.Set<JsonOptions> options, int indent)  
      private static java.lang.String typeName​(TomlType tomlType)  
      • Methods inherited from class java.lang.Object

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

      • JsonSerializer

        private JsonSerializer()
    • Method Detail

      • toJson

        static void toJson​(TomlTable table,
                           java.lang.Appendable appendable,
                           java.util.Set<JsonOptions> options)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • toJson

        private static void toJson​(TomlTable table,
                                   java.lang.Appendable appendable,
                                   java.util.Set<JsonOptions> options,
                                   int indent)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • toJson

        static void toJson​(TomlArray array,
                           java.lang.Appendable appendable,
                           java.util.Set<JsonOptions> options)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • toJson

        private static void toJson​(TomlArray array,
                                   java.lang.Appendable appendable,
                                   java.util.Set<JsonOptions> options,
                                   int indent)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • appendTomlValue

        private static void appendTomlValue​(java.lang.Object value,
                                            java.lang.Appendable appendable,
                                            java.util.Set<JsonOptions> options,
                                            int indent)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • typeName

        private static java.lang.String typeName​(TomlType tomlType)
      • appendTomlValueLiteral

        private static void appendTomlValueLiteral​(TomlType tomlType,
                                                   java.lang.Object value,
                                                   java.lang.Appendable appendable,
                                                   java.util.Set<JsonOptions> options)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • append

        private static void append​(java.lang.Appendable appendable,
                                   int indent,
                                   java.lang.String line)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • appendLine

        private static void appendLine​(java.lang.Appendable appendable,
                                       java.lang.String line)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • indentLine

        private static void indentLine​(java.lang.Appendable appendable,
                                       int indent)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • escape

        private static java.lang.StringBuilder escape​(java.lang.String text)