everx-labs / TVM-Solidity-Compiler

Solidity compiler for TVM
GNU General Public License v3.0
125 stars 72 forks source link

Make generator json for solidity #103

Closed user090909 closed 1 year ago

user090909 commented 2 years ago

Hello. I have a problem with generating json objects onchain. For example with tip4_2 we can change json on chain but for now its a bit hard _json = '{"type": "Basic Nft", "name": "Opened nft lootbox","preview": {"source":"' + format("{}",_img.link) +'","mimetype":"' + format("{}", _img.mimetype) + '"}}'; we need to do such constructions where we can easily put a mistake. Probably, json generators like in python could help with this problems?

user090909 commented 2 years ago

https://gist.github.com/user090909/51bf389ae1914bee0e59b342216d5a4e

cryshado commented 1 year ago

@user090909 Thanks for the issue. Currently we don't plan to build JSON serialization into the language's capabilities yet, but you can still easily implement such a serializer by following the information at www.json.org