Relative blockchain newbie here (go easy on me please:)
Let's say I have a JSON object that contains:
- UPC code
- Product name
- Product color
- 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?
Best Answer
You can store JSON as a string. see this fiddle: https://ethfiddle.com/u8SvB0QMgE
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