4 ms·
I have been using ChatGPT to test its ability to create JSON on the fly, just with a natural language description of the exact data format, and a natural langua
by selfhoster11 4y ago
I have been using ChatGPT to test its ability to create JSON on the fly, just with a natural language description of the exact data format, and a natural language description of what I want to go in that object. It even escapes the string properly if it contains special characters, from what I noticed.
Other than complicated requests like “if object is of type A, include fields ABC but not D. If object is of type B, include only D but not other fields”, it gets this right 99% of the time.
It also works for CSV, but it’s trickier. It seems like it “knows” how JSON works to a much better extent.
And as for parsing JSON? I’ve not truly pushed it to its limits yet, but so far it’s had no issues understanding any of it.
It’s mind-boggling. Yes, it’s inefficient, but it can basically parse, generate and process valid JSON with just a brief set of instructions for what you want to do. For exploring ad-hoc data structures or quick mocking of API backends, this is great.
- kordlessagain 4y agoTry evaling completed Python dicts! Works like a champ…