1

Relative blockchain newbie here (go easy on me please:)

Let's say I have a JSON object that contains:

  1. UPC code
  2. Product name
  3. Product color
  4. Product size

Could I store this object in the blockchain--and then retrieve it by UPC?

Now let's say I have a few hundred million of these, with thousands of new ones being created daily.

Possible? What's the process?

3

You can store JSON as a string. see this fiddle: https://ethfiddle.com/u8SvB0QMgE

enter image description here

You can also store a mapping of string->string which could be used if you wanted to retrieve JSON data by key. But Ethereum isn't a JSON-database and you won't be able to search within you JSON data without retrieving it first.

As for you second question, you can store millions of these as long as you can pay for it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.