There is a .json file with the contents:

ItemBlueprint { "ingredients": [ { "itemDef": { "instanceID": 126858 }, "amount": 20.0 }, { "itemDef": { "instanceID": 127252 }, "amount": 200.0 } ], "userCraftable": true, "isResearchable": true, "rarity": 1, "NeedsSteamItem": false, "blueprintStackSize": -1, "time": 60.0, "amountToCreate": 1, "UnlockLevel": 6, "UnlockPrice": 3 } 

What kind of format is this and how can I read it just like XML, for example?

  • From your question, it is clear that you have problems with reading, then perhaps the solution to your problem is glasses or a trip to an optometrist? If I still incorrectly interpreted your question - expand it, for example, where and how you want to read it. Well, on the topic is a format often used in data exchange. - JVic
  • what kind of format is it ru.wikipedia.org/wiki/JSON - Vyacheslav Danshin
  • Forgot to clarify. Tools such as PHP or Javascript need to access the elements of this content. - statham
  • I see that it is json, but the ItemBlueprint in front of the object confuses me. - statham

1 answer 1

Everything except the "ItemBlueprint" string is a JSON format. You can read it using the standard functions of the language (for example, JSON.parse in javascript and json_decode in php).

What does the line "ItemBlueprint" - this can only be guessed. And the best thing to ask (or read the documentation) from the one who formed this file. Intuition tells me that this is the name of a class whose object was serialized using JSON. But this is only my guesswork.

How to separate this line from JSON - I think you will understand, it's not a tricky thing.