If you paste a JSON string into a block comment, JetBrains will autogenerate structs

60 points xarvatium

Found this out today when I pasted a JSON string into a block comment so I could keep it in one place while making the structs. I use CLion (I think the plugin's available universally though) and had no idea you could do this. I pretty-fied the string first so that may be required, but I hope this saves someone else the time wasted making some deep nested structs when this exists. It'll even add the #\[derive(Serialize, Deserialize)\] flag above them and make all of the values public.

​

https://preview.redd.it/gxqx7jd5rpp91.png?width=349&format=png&auto=webp&s=be65c9e4fd3331e8f6d4d34c083fc85febcabf4f