Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset data structure support #27

Open
adonnini opened this issue Sep 3, 2018 · 0 comments
Open

Asset data structure support #27

adonnini opened this issue Sep 3, 2018 · 0 comments
Assignees
Labels
bug Something isn't working work-in-progress

Comments

@adonnini
Copy link

adonnini commented Sep 3, 2018

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>

@innopreneur innopreneur added the bug Something isn't working label Sep 5, 2018
@innopreneur innopreneur self-assigned this Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work-in-progress
Projects
None yet
Development

No branches or pull requests

2 participants