首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >搜索Json字符串

搜索Json字符串
EN

Stack Overflow用户
提问于 2016-10-11 11:16:31
回答 1查看 29关注 0票数 0

您好,我使用Spirit_Json,我对json不是很了解,想知道如何从这个文件中获取字符串/整数。

像get函数之类的?

代码语言:javascript
复制
{
     "Rune_fire1": {
     "level": 1,
         "name": "Fire Rune 1",
         "damage": 1,
         "hp": 0,
         "runecost": 0,
         "defense": 0,
         "negate": 0,
         "evasion": 0,
         "healing": 0,


         "description": "The First Shard of the Fire Rune."
     },


     "Rune_fire2": {
     "level": 1,
         "name": "Fire Rune 2",
         "damage": 2,
         "hp": 0,
         "runecost": 0,
         "defense": 0,
         "negate": 0,
         "evasion": 0,
         "healing": 0,
         "description": "The Second Shard of the Fire Rune."
     },


     "Rune_fire3": {
     "level": 1,
         "name": "Fire Rune 3",
         "damage": 3,
         "hp": 0,
         "runecost": 0,
         "defense": 0,
         "negate": 0,
         "evasion": 0,
         "healing": 0,
         "description": "The Third Shard of the Fire Rune."
     },


     "Rune_fire4": {
     "level": 1,
         "name": "Fire Rune 4",
         "damage": 4,
         "hp": 0,
         "runecost": 0,
         "defense": 0,
         "negate": 0,
         "evasion": 0,
         "healing": 0,
         "description": "The Fourth Shard of the Fire Rune."
     },


     "Rune_fire5": {
     "level": 1,
         "name": "Fire Rune 5",
         "damage": 5,
         "hp": 0,
         "runecost": 0,
         "defense": 0,
         "negate": 0,
         "evasion": 0,
         "healing": 0,
         "description": "The Fifth Shard of the Fire Rune."
     },
EN

回答 1

Stack Overflow用户

发布于 2016-10-11 11:21:31

你可以为json使用一个库。有一个带有boost-lib的:enter link description here

还有其他的,比如jsoncpp。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39969994

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档