Class Json


  • public class Json
    extends Object
    Deprecated.
    Author:
    giovanni.antino@h2tcoin.com
    • Method Detail

      • i

        public static Json i()
        Deprecated.
        current instance of the singleton
        Returns:
      • toJson

        public String toJson​(TransactionBean tb)
        Deprecated.
        Serialize a TransactionBean into a String in Json format
        Parameters:
        tb - the TransactionBean to be serialized
        Returns:
        the serialized TransactionBean in json
      • toJson

        public String toJson​(InternalTransactionBean itb)
        Deprecated.
        Serialize an InternalTransactionBean into a String in Json format
        Parameters:
        itb - the InternalTransactionBean to be serialized
        Returns:
        the serialized InternalTransactionBean in json
      • toJson

        public String toJson​(InternalBlockBean ibb)
        Deprecated.
        Serialize an InternalBlockBean into a String in Json format
        Parameters:
        ibb - the InternalBlockBean to be serialized
        Returns:
        the serialized InternalBlockBean in json
      • fromJsonToTb

        public TransactionBean fromJsonToTb​(String tb)
        Deprecated.
        try to deserialize a TransactionBean, if the deserialization fail return a null and log a warning message. If required fields public key, message or signature are null it assume that the object is broken
        Parameters:
        tb -
        Returns:
        deserialized TransactionBean
      • fromJsonToItb

        public InternalTransactionBean fromJsonToItb​(String itb)
        Deprecated.
        try to deserialize an InternalTransactionBean, if the deserialization fails return a null and log a warning message. If required fields such as from, or transactionCrc are null it assumes that the object is broken
        Parameters:
        itb -
        Returns:
        deserialized InternalTransactionBean
      • fromJsonToIbb

        public InternalBlockBean fromJsonToIbb​(String ibb)
        Deprecated.
        try to deserialize an InternalBlockBean, if the deserialization fails return a null and log a warning message. If required fields such as coinbase, previousBlock, blockHash, or transactions are null it assumes that the object is broken
        Parameters:
        itb -
        Returns:
        deserialized InternalBlockBean