私はこのjsonファイルを持っています。その一部を以下に示します。
{ "has_more" : false,
"items" : [ { "aliases" : [ "http://www.stackoverflow.com" ],
"api_site_parameter" : "stackoverflow",
"markdown_extensions" : [ "Prettify" ],
"name" : "Stack Overflow",
"related_sites" : [ { "name" : "Stack Overflow Chat",
"relation" : "chat",
"site_url" : "http://chat.stackoverflow.com"
} ],
"site_state" : "normal",
"site_type" : "main_site",
"site_url" : "http://stackoverflow.com",
"styling" : { "link_color" : "#0077CC",
"tag_background_color" : "#E0EAF1",
"tag_foreground_color" : "#3E6D8E"
}
},
{ "api_site_parameter" : "serverfault",
"markdown_extensions" : [ "Prettify" ],
"name" : "Server Fault",
"related_sites" : [ { "api_site_parameter" : "meta.serverfault",
"name" : "Meta Server Fault",
"relation" : "meta",
"site_url" : "http://meta.serverfault.com"
},
{ "name" : "Chat Stack Exchange",
"relation" : "chat",
"site_url" : "http://chat.stackexchange.com"
}
],
"site_state" : "normal",
"site_type" : "main_site",
"site_url" : "http://serverfault.com",
"styling" : { "link_color" : "#10456A",
次のような文字列に一致させたい
"related_sites" : [ { "name" : "Stack Overflow Chat",
"relation" : "chat",
"site_url" : "http://chat.stackoverflow.com"
} ],
と
"related_sites" : [ { "api_site_parameter" : "meta.serverfault",
"name" : "Meta Server Fault",
"relation" : "meta",
"site_url" : "http://meta.serverfault.com"
},
{ "name" : "Chat Stack Exchange",
"relation" : "chat",
"site_url" : "http://chat.stackexchange.com"
}
],
複数行を有効にせずに。それを行う方法はありますか?