Invalid Json makes me nervous

This is a different kind of Invalid Json.
Microsoft dotnet implement is own System.Text.Json, that requires json to be valid. valid means the following will be invalid. It must have quotes around property names:
{
name: “gpt”
}
i.e., it has to be this:
{
“name”: “gpt”
}

I am wondering, when OpenAI talk about valid json, will it produce the first kindof json? What makes me nervous is: On OpenAI api documents, a lot of examples showing invaild json, as it seems openai has a different definition of invalid json.

Hi,

Welcome to the developer forum!

Can you give an example of where the keys have no quotes?

1 Like

Sorry, my bad. In the function calling examples, you are giving code examples in nodejs. There’s no quote in keys.
https://platform.openai.com/docs/guides/function-calling/function-calling-with-structured-outputs

Function calling with Structured Outputs

But I guess it’s nodejs syntax. I thought actual json spit out from LLM.

1 Like