Skip to content

Asset data structure support #27

Description

@adonnini

The bigchaindb specs state that an asset can be

"an associative array containing exactly one key-value pair."

in the glossary an associative array is defined as

"A collection of key/value (or name/value) pairs such that each possible key appears at most once in the collection. In JavaScript (and JSON), all objects behave as associative arrays with string-valued keys. In Python and .NET, associative arrays are called dictionaries. In Java and Go, they are called maps. In Ruby, they are called hashes. See also: Wikipedia’s articles for Associative array and Comparison of programming languages (associative array)"

The specs do not appear to place limitations on the data types for the keys and values of an associative array's records

Yet, at this point in time, the java driver support only asset data of the following types:

String
String[]
TreeMap<String, String>

When trying to execute a transaction with asset data of type other than the above, the transaction fails with "malformed" error message

For my Android app, I need to be able to have transactions with at least data of the following types:

List/ArrayList
TreeMap<String, Custom class>

The same is true of metadata. I need to be able to have metada of types

List/ArrayList
TreeMap<String, Custom class>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions