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 InternalBlockBeanfromJsonToIbb(String ibb)Deprecated.try to deserialize anInternalBlockBean, if the deserialization fails return a null and log a warning message.InternalTransactionBeanfromJsonToItb(String itb)Deprecated.try to deserialize anInternalTransactionBean, if the deserialization fails return a null and log a warning message.TransactionBeanfromJsonToTb(String tb)Deprecated.try to deserialize aTransactionBean, if the deserialization fail return a null and log a warning message.static Jsoni()Deprecated.current instance of the singletonStringtoJson(InternalBlockBean ibb)Deprecated.Serialize anInternalBlockBeaninto a String in Json formatStringtoJson(InternalTransactionBean itb)Deprecated.Serialize anInternalTransactionBeaninto a String in Json formatStringtoJson(TransactionBean tb)Deprecated.Serialize aTransactionBeaninto 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 aTransactionBeaninto a String in Json format- Parameters:
tb- theTransactionBean to be serialized- Returns:
- the serialized
TransactionBeanin json
-
toJson
public String toJson(InternalTransactionBean itb)
Deprecated.Serialize anInternalTransactionBeaninto a String in Json format- Parameters:
itb- theInternalTransactionBean to be serialized- Returns:
- the serialized
InternalTransactionBeanin json
-
toJson
public String toJson(InternalBlockBean ibb)
Deprecated.Serialize anInternalBlockBeaninto a String in Json format- Parameters:
ibb- theInternalBlockBean to be serialized- Returns:
- the serialized
InternalBlockBeanin 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
-
-