Class Json
- java.lang.Object
-
- com.h2tcoin.takamakachain.utils.threadSafeUtils.Json
-
public class Json extends Object
Deprecated.- Author:
- giovanni.antino@h2tcoin.com
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description InternalBlockBean
fromJsonToIbb(String ibb)
Deprecated.try to deserialize anInternalBlockBean
, if the deserialization fails return a null and log a warning message.InternalTransactionBean
fromJsonToItb(String itb)
Deprecated.try to deserialize anInternalTransactionBean
, if the deserialization fails return a null and log a warning message.TransactionBean
fromJsonToTb(String tb)
Deprecated.try to deserialize aTransactionBean
, if the deserialization fail return a null and log a warning message.static Json
i()
Deprecated.current instance of the singletonString
toJson(InternalBlockBean ibb)
Deprecated.Serialize anInternalBlockBean
into a String in Json formatString
toJson(InternalTransactionBean itb)
Deprecated.Serialize anInternalTransactionBean
into a String in Json formatString
toJson(TransactionBean tb)
Deprecated.Serialize aTransactionBean
into a String in Json format
-
-
-
Method Detail
-
i
public static Json i()
Deprecated.current instance of the singleton- Returns:
-
toJson
public String toJson(TransactionBean tb)
Deprecated.Serialize aTransactionBean
into a String in Json format- Parameters:
tb
- theTransactionBean to be serialized
- Returns:
- the serialized
TransactionBean
in json
-
toJson
public String toJson(InternalTransactionBean itb)
Deprecated.Serialize anInternalTransactionBean
into a String in Json format- Parameters:
itb
- theInternalTransactionBean to be serialized
- Returns:
- the serialized
InternalTransactionBean
in json
-
toJson
public String toJson(InternalBlockBean ibb)
Deprecated.Serialize anInternalBlockBean
into a String in Json format- Parameters:
ibb
- theInternalBlockBean to be serialized
- Returns:
- the serialized
InternalBlockBean
in json
-
fromJsonToTb
public TransactionBean fromJsonToTb(String tb)
Deprecated.try to deserialize aTransactionBean
, 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 anInternalTransactionBean
, 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 anInternalBlockBean
, 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
-
-