zxybazh commented on pull request #8587:
URL: https://github.com/apache/tvm/pull/8587#issuecomment-889439432


   > Definitely agreed, long-term it's better to go through a standard format. 
I played around a bit with converting the tvm `Map` to a json string, but while 
it wasn't too hard to get something working for my test cases, getting it fully 
functional and clean felt like it would take longer than a quick edit. (And I'd 
probably have wanted to switch to a C++ JSON parser to avoid jumping between 
languages too often, which would have added its own issues.)
   
   Yes, it's more than a little work to make the Map 100% compatible to json. A 
c++ Json parser is ok to me but not necessary if there is nothing the current 
parser cannot do -- just to save time and as least the python parser is 
guaranteed to be correct right : )
   
   > Yeah, the compatibility was what I was most concerned about. I wanted to 
update the `.str()` method itself, rather than introducing a new function such 
as `.json()`, because that's what gets called elsewhere. The updated 
parser/serializer should maintain the exact same string output for attribute 
keys without embedded spaces, but "should" is always a bit of a dangerous word.
   
   I think the `export` function is acting as `.json()` right now. For `str` it 
would be a large project because it's used in a lot of places in key 
components. I think it's worth more discussion before we make it happen : ) But 
definitely direction to go in the future.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to