I’m trying to figure out how to handle tuples in candid. On Internet Computer Content Validation Bootstrap It looks like you can do record { a; b; c}, but elsewhere it is stated that the order for records doesn’t matter.
If I have a function
public func test( x : ( Nat, Nat32, Text)) -> Text
Candid UI produces something like this for tuples: (record {text; nat; nat32}) → (text) query
How is this encoded in candid? For dfx I think I just add some extra parens to separate it off, but I’m guessing that the candid encoder does something to this to make the order imporat.
Use case: Messing with GitHub - edjCase/motoko_candid and trying to convert a Candy Library Array where values can be of multiple types. My assumption was if they were all the same to submit a vec and if they were different to treat it as a tuple. Motoko candid doesn’t really have the concept of a tuple except at the top level which is an [Arg].