我有一个特定的问题,读取一个json字符串,我必须通过get函数从URL加载。
这将是一个调查应用程序,用户可以在其中添加自己的问题,但这对于任务并不重要。基本上我没有创建数据库或php文件的接口。
当我发送获取请求时,我会收到回复:
{"state":true,"events":[{"id":"13","tstamp":"value","name":"string","logo":{"id":"value","pid":null,"tstamp":"value","uuid":null,"type":"file","path":"string.jpg","extension":"jpg","hash":"value","found":"1","name":"string.jpg","importantPartX":"0","importantPartY":"0","importantPartWidth":"0","importantPartHeight":"0","meta":null},"description":"","languages":["de"]},{"id":"11","tstamp":"value","name":"string","logo":{"id":"109","pid":null,"tstamp":"value","uuid":null,"type":"file","path":"string.jpg","extension":"jpg","hash":"value","found":"1","name":"string.jpg","importantPartX":"0","importantPartY":"0","importantPartWidth":"0","importantPartHeight":"0","meta":null},"description":"Hier kommt eine kleine Beschreibung.","languages":["de"]},{"id":"12","tstamp":"value","name":"string","logo":{"id":"10949","pid":null,"tstamp":"value","uuid":null,"type":"file","path":"string.jpeg","extension":"jpeg","hash":"value","found":"1","name":"string.jpeg","importantPartX":"0","importantPartY":"0","importantPartWidth":"0","importantPartHeight":"0","meta":null},"description":"","languages":["de","en","it","fr"]}]}
我的问题是:我如何分离这些值/读取这些值以便在unity3d中使用它们?
也有一些json对问题和答案做出回应,基本上和上面一样。但我如何分离价值,增加他们的指数?后来问题json字符串必须与答案json字符串相关联。
此外,json字符串包含一些图像引用,我也必须阅读,以下载图像文件。
我看了一些教程,但那些json字符串有点不同,所以我不确定。主要问题是通过其展示位置(括号)了解字符串值
有人可以向我解释一下吗?