Json file to Vex String?

   1357   4   0
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I know absolutely nothing about python but I'm very comfortable with vex. I would like to store a .json content on a vex string. If it's not possible to read a .json directly from a vex wrangle, can somebody tell me exactly how to do it with python? ...could be stored in a Detail attribute.

Thanks

-Olivier
Edited by olivierth - Nov. 14, 2022 12:14:14
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Oh, thanks for the reply!
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
animatrix_
VEX has json functions:
https://www.sidefx.com/docs/houdini/vex/functions/json_loads.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/json_dumps.html [www.sidefx.com]

wow, is that from when they added dict type to vex?
User Avatar
Member
4495 posts
Joined: Feb. 2012
Offline
jsmack
animatrix_
VEX has json functions:
https://www.sidefx.com/docs/houdini/vex/functions/json_loads.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/json_dumps.html [www.sidefx.com]

wow, is that from when they added dict type to vex?

I think so as dictionary attributes were also added in 18.5.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links