Using IDLArgs
Last updated
Last updated
To create the binary form of Candid data in Java or to convert data from candid binary form to Java use the class.
This is how to create a byte[] array from a List of .
is a wrapped value, consisting of the Java value and the .
To convert data from byte[] array to IDLArgs use the Method fromBytes.
When dealing with Complex Types, consider defining IDLTypes , a useful way for deserialization.
class is a wrapper for Candid type definition. Use createType method to create a Java object.
For simple Candid types use only the argument.
When creating VEC or OPT Candid types, the inner type needs to be defined.
The inner type can also have nested types.
When creating the RECORD or VARIANT Candid types, the Type Map needs to be defined.
Type Map can also have nested types.
These will automatically identify the default Candid type for Java class or object.
To override default type use this variant.
To create the IDLValue Java object use the Method Create functon.
This method has several variants, in if the explicit type definition is required.
To get the Java object value from IDLValue use the Method getValue function.
The key in Type Map is the type. Label can be Named, Unnamed or Id type.
To create the directly from Java class or object use the helper methods.