I see there's a good utils repo for strings here:


I'm just wondering whether there's one for stringifying JSON. Or an example that does this.

Input: map or array of maps Output: String or bytes

Thanks in advance.

  • Such an operation would be unnecessarily expensive. I am not aware of any existing utility like that. Feb 17 at 20:35
  • Would it still be expensive if it was within an offchain view and it only had to do it for a couple of fields?
    – JJJ
    Feb 17 at 21:24
  • 1
    for the Endless Ways token_metadata off-chain view i basically ended up assembling fragments of pre-baked JSON strings. unfortunately there is very little support or interest from the tools devs to support this kind of use-case, even though it is obviously important for non-trivial NFT contracts. sigh.
    – damian
    Feb 18 at 19:28
  • @damian, I'm working on a util for it so others can use on their offchain view. Any chance you could link to the code where you're doing this? I'm curious to see how you did it and what metadata you included.
    – JJJ
    Feb 18 at 20:30
  • @JJJ it's kinda complicated 😅 DM me on twitter twitter.com/EndlessWays_TZ or join our discord (link in Twitter bio) and i'd be happy to share what i'm doing
    – damian
    Feb 19 at 8:21


Your Answer

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

Browse other questions tagged or ask your own question.