Package jade

Class JadeDeserializer

java.lang.Object
jade.JadeDeserializer

public class JadeDeserializer extends Object
The JadeDeserializer is used to convert the contents of a file or a string to a new JadeObject.

Structure of an example .jde file:

variableOne: 'valueOne';

variableTwo: 'valueTwo';

: -> used to split the variable and its value.

; -> to denote the end of a variable.

' -> surrounds a value of a variable.

Since:
2023
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty JadeDeserializer constructor, it has no variables that require initialises.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deserializes a string from a given file into a JadeObject.The file and its strings require a large amount of parsing for correct JadeObject creation.New lines are removed, data is split based on ; and pairs are determined by : and ''.
    Deserializes a given string.The string itself is first parsed removing any unnceresary artifcats.It is split identically to the file splitting.

    Methods inherited from class java.lang.Object

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

    • JadeDeserializer

      public JadeDeserializer()
      Empty JadeDeserializer constructor, it has no variables that require initialises.
  • Method Details

    • deserializeFromFile

      public JadeObject deserializeFromFile(String dir)
      Deserializes a string from a given file into a JadeObject.The file and its strings require a large amount of parsing for correct JadeObject creation.New lines are removed, data is split based on ; and pairs are determined by : and ''.
      Parameters:
      dir - directory
      Returns:
      JadeObject
    • deserializeFromString

      public JadeObject deserializeFromString(String jadeString)
      Deserializes a given string.The string itself is first parsed removing any unnceresary artifcats.It is split identically to the file splitting.
      Parameters:
      jadeString - serialized jade string
      Returns:
      JadeObject