Json-Viewer:URL中的数据

时间:2012-05-30 08:20:01

标签: json

我正在寻找一个在线Json-Viewer,我可以直接在网址中附加json数据。

我写了一个由我的应用程序创建的json数据的日志声明,我想通过点击一个链接直接检查它。

所以我一直想找到这样的东西:

http://jsonviewer.stack.hu/#{myJson:data}

谢谢!

3 个答案:

答案 0 :(得分:1)

是的,您可以通过在网址上托管您的json数据并将其传递给jsonviewer.stack.hu来实现。

使用示例:

这里json托管在网址

http://refine.taxonomics.org/gbifchecklists/reconcile?query=Crepidomanes%20minutum

输出

{"result":[{"summary":{"clazz":{"Polypodiopsida":1,"Filicopsida":1},"taxonomicStatus":"ACCEPTED","key":{"111237248":1,"3608345":1},"scientificName":"Crepidomanes minutum (Blume) K. Iwats.","identifiers":{"$VAR1 = [\n          {\n            'identifier' => '819461',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => '9ca92552-f23a-41a8-a140-01abaa31c931',\n            'usageKey' => 111237248,\n            'key' => 12360861\n          }\n        ];\n":1,"$VAR1 = [\n          {\n            'identifier' => '119151859',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => 'd7dddbf4-2cf0-4f39-9b2a-bb099caae36c',\n            'usageKey' => 3608345,\n            'key' => 1947318\n          }\n        ];\n":1},"phylumKey":{"59":1,"107377362":1},"nameType":"WELLFORMED","order":{"Hymenophyllales":1,"Polypodiales":1},"numDescendants":"0","canonicalName":"Crepidomanes minutum","parent":"Crepidomanes","parentKey":{"111237230":1,"6420275":1},"origin":"SOURCE","synonym":"$VAR1 = bless( do{\\(my $o = 0)}, 'JSON::XS::Boolean' );\n","datasetKey":{"9ca92552-f23a-41a8-a140-01abaa31c931":1,"d7dddbf4-2cf0-4f39-9b2a-bb099caae36c":1},"family":"Hymenophyllaceae","classKey":{"107305382":1,"7228684":1},"orderKey":{"7228685":1,"107305408":1},"accordingTo":{"The Catalogue of Life, 3rd January 2011":1},"sourceId":{"819461":1,"119151859":1},"genusKey":{"111237230":1,"6420275":1},"authorship":"K. Iwats. (Blume)","genus":"Crepidomanes","kingdom":"Plantae","nomenclaturalStatus":"$VAR1 = [];\n","species":"Crepidomanes minutum","kingdomKey":{"6":1,"107264512":1},"speciesKey":{"111237248":1,"3608345":1},"familyKey":{"2372":1,"107238235":1},"phylum":"Pteridophyta","rank":"SPECIES","nubKey":"3608345"},"match":false,"name":"Crepidomanes minutum K. Iwats. (Blume) (Plantae)","score":2,"type":["http://www.gbif.org/species/"],"id":111237248},{"summary":{"key":"128412817","scientificName":"Crepidomanes minutum","identifiers":"$VAR1 = [\n          {\n            'identifier' => '484386',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => 'e632b198-5b2f-47ee-b7a6-6531ea435fa3',\n            'usageKey' => 128412817,\n            'key' => 22633798\n          }\n        ];\n","nameType":"WELLFORMED","numDescendants":"0","sourceId":"484386","canonicalName":"Crepidomanes minutum","parent":"Crepidomanes","genusKey":"131300935","authorship":"","parentKey":"131300935","genus":"Crepidomanes","origin":"SOURCE","nomenclaturalStatus":"$VAR1 = [];\n","species":"Crepidomanes minutum","speciesKey":"128412817","synonym":"$VAR1 = bless( do{\\(my $o = 0)}, 'JSON::XS::Boolean' );\n","datasetKey":"e632b198-5b2f-47ee-b7a6-6531ea435fa3","rank":"SPECIES","nubKey":"3608345"},"match":false,"name":"Crepidomanes minutum (Life)","score":1,"type":["http://www.gbif.org/species/"],"id":128412817},{"summary":{"classKey":"106145328","orderKey":"106469758","clazz":"Polypodiopsida","key":"106137798","scientificName":"Crepidomanes minutum","identifiers":"$VAR1 = [\n          {\n            'identifier' => '32127',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => 'fab88965-e69d-4491-a04d-e3198b626e52',\n            'usageKey' => 106137798,\n            'key' => 5892380\n          }\n        ];\n","phylumKey":"106171079","nameType":"WELLFORMED","order":"Hymenophyllales","numDescendants":"0","sourceId":"32127","canonicalName":"Crepidomanes minutum","parent":"Crepidomanes","authorship":"","genusKey":"106112877","parentKey":"106112877","genus":"Crepidomanes","kingdom":"Viridiplantae","origin":"SOURCE","nomenclaturalStatus":"$VAR1 = [];\n","species":"Crepidomanes minutum","kingdomKey":"106147210","speciesKey":"106137798","synonym":"$VAR1 = bless( do{\\(my $o = 0)}, 'JSON::XS::Boolean' );\n","familyKey":"106112824","datasetKey":"fab88965-e69d-4491-a04d-e3198b626e52","phylum":"Streptophyta","rank":"SPECIES","family":"Hymenophyllaceae","nubKey":"3608345"},"match":false,"name":"Crepidomanes minutum (Viridiplantae)","score":1,"type":["http://www.gbif.org/species/"],"id":106137798},{"summary":{"classKey":"116129810","orderKey":"116129818","clazz":"Filicopsida","key":"110817557","scientificName":"Crepidomanes minutum (Blume) K. Iwats., 1985","identifiers":"$VAR1 = [\n          {\n            'identifier' => '205257',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => '1ec61203-14fa-4fbd-8ee5-a4a80257b45a',\n            'usageKey' => 110817557,\n            'key' => 12198868\n          }\n        ];\n","phylumKey":"116129809","nameType":"WELLFORMED","order":"Hymenophyllales","numDescendants":"0","sourceId":"205257","canonicalName":"Crepidomanes minutum","parent":"Crepidomanes","authorship":"K. Iwats., 1985 (Blume)","genusKey":"116129821","parentKey":"116129821","genus":"Crepidomanes","kingdom":"Plantae","origin":"SOURCE","nomenclaturalStatus":"$VAR1 = [];\n","species":"Crepidomanes minutum","kingdomKey":"116127234","speciesKey":"110817557","synonym":"$VAR1 = bless( do{\\(my $o = 0)}, 'JSON::XS::Boolean' );\n","familyKey":"116129819","datasetKey":"1ec61203-14fa-4fbd-8ee5-a4a80257b45a","phylum":"Pteridophyta","rank":"SPECIES","family":"Hymenophyllaceae","nubKey":"3608345"},"match":false,"name":"Crepidomanes minutum K. Iwats., 1985 (Blume) (Plantae)","score":1,"type":["http://www.gbif.org/species/"],"id":110817557},{"summary":{"key":"108671970","scientificName":"Crepidomanes minutum (Blume) K.Iwats.","identifiers":"$VAR1 = [\n          {\n            'identifier' => 'urn:lsid:ipni.org:names:17516350-1',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => '046bbc50-cae2-47ff-aa43-729fbf53f7c5',\n            'usageKey' => 108671970,\n            'key' => 9192285\n          },\n          {\n            'identifier' => 'http://www.ipni.org/ipni/idPlantNameSearch.do?&show_history=true&id=17516350-1',\n            'type' => 'URL',\n            'datasetKey' => '046bbc50-cae2-47ff-aa43-729fbf53f7c5',\n            'identifierLink' => 'http://www.ipni.org/ipni/idPlantNameSearch.do?&show_history=true&id=17516350-1',\n            'usageKey' => 108671970,\n            'key' => 9192284\n          }\n        ];\n","nameType":"WELLFORMED","numDescendants":"0","sourceId":"urn:lsid:ipni.org:names:17516350-1","remarks":"Crepidomanes minutum (Blume) K.Iwats.","canonicalName":"Crepidomanes minutum","link":"http://www.ipni.org/ipni/idPlantNameSearch.do?&show_history=true&id=17516350-1","parent":"Hymenophyllaceae","authorship":"K.Iwats. (Blume)","parentKey":"115219389","nomenclaturalStatus":"$VAR1 = [];\n","origin":"SOURCE","kingdom":"Plantae","species":"Crepidomanes minutum","kingdomKey":"115219148","speciesKey":"108671970","synonym":"$VAR1 = bless( do{\\(my $o = 0)}, 'JSON::XS::Boolean' );\n","familyKey":"115219389","datasetKey":"046bbc50-cae2-47ff-aa43-729fbf53f7c5","rank":"SPECIES","nubKey":"3608345","family":"Hymenophyllaceae"},"match":false,"name":"Crepidomanes minutum K.Iwats. (Blume) (Plantae)","score":1,"type":["http://www.gbif.org/species/"],"id":108671970},{"summary":{"clazz":"Polypodiopsida","taxonomicStatus":"SYNONYM","key":"106797953","scientificName":"Crepidomanes minutum (Blume) K.Iwats.","identifiers":"$VAR1 = [\n          {\n            'identifier' => 'e19935',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => 'fab88965-e69d-4491-a04d-e3198b626e52',\n            'usageKey' => 106797953,\n            'key' => 6544470\n          }\n        ];\n","phylumKey":"106171079","nameType":"WELLFORMED","order":"Hymenophyllales","numDescendants":"0","canonicalName":"Crepidomanes minutum","parent":"Crepidomanes","parentKey":"106112877","origin":"SOURCE","acceptedKey":"106137798","synonym":"$VAR1 = bless( do{\\(my $o = 1)}, 'JSON::XS::Boolean' );\n","datasetKey":"fab88965-e69d-4491-a04d-e3198b626e52","family":"Hymenophyllaceae","classKey":"106145328","orderKey":"106469758","sourceId":"e19935","genusKey":"106112877","authorship":"K.Iwats. (Blume)","genus":"Crepidomanes","kingdom":"Viridiplantae","nomenclaturalStatus":"$VAR1 = [];\n","species":"Crepidomanes minutum","kingdomKey":"106147210","speciesKey":"106137798","familyKey":"106112824","accepted":"Crepidomanes minutum","phylum":"Streptophyta","nubKey":"3608345"},"match":false,"name":"Crepidomanes minutum K.Iwats. (Blume) [=> Crepidomanes minutum] (Viridiplantae)","score":1,"type":["http://www.gbif.org/species/"],"id":106797953},{"summary":{"clazz":"Polypodiopsida","taxonomicStatus":"SYNONYM","key":"126638048","scientificName":"Crepidomanes minutum (Bl.) K. Iwats.","identifiers":"$VAR1 = [\n          {\n            'identifier' => '14239216',\n            'type' => 'SOURCE_ID',\n            'datasetKey' => '7ddf754f-d193-4cc9-b351-99906754a03b',\n            'usageKey' => 126638048,\n            'key' => 20762879\n          },\n          {\n            'identifier' => 'http://www.catalogueoflife.org/annual-checklist/details/species/id/14220376/synonym/14239216',\n            'type' => 'URL',\n            'datasetKey' => '7ddf754f-d193-4cc9-b351-99906754a03b',\n            'identifierLink' => 'http://www.catalogueoflife.org/annual-checklist/details/species/id/14220376/synonym/14239216',\n            'usageKey' => 126638048,\n            'key' => 20762878\n          }\n        ];\n","phylumKey":"127795625","nameType":"WELLFORMED","order":"Hymenophyllales","numDescendants":"0","canonicalName":"Crepidomanes minutum","parent":"Crepidomanes","parentKey":"127934692","origin":"SOURCE","acceptedKey":"126619208","synonym":"$VAR1 = bless( do{\\(my $o = 1)}, 'JSON::XS::Boolean' );\n","datasetKey":"7ddf754f-d193-4cc9-b351-99906754a03b","family":"Hymenophyllaceae","classKey":"127802277","orderKey":"127805044","sourceId":"14239216","link":"http://www.catalogueoflife.org/annual-checklist/details/species/id/14220376/synonym/14239216","genusKey":"127934692","authorship":"K. Iwats. (Bl.)","genus":"Crepidomanes","kingdom":"Plantae","nomenclaturalStatus":"$VAR1 = [];\n","species":"Crepidomanes proliferum","kingdomKey":"127795624","speciesKey":"126619208","familyKey":"127805045","accepted":"Crepidomanes proliferum (Bl.) Bostock","phylum":"Tracheophyta","rank":"SPECIES","nubKey":"3608345"},"match":false,"name":"Crepidomanes minutum K. Iwats. (Bl.) [=> Crepidomanes proliferum (Bl.) Bostock] (Plantae)","score":1,"type":["http://www.gbif.org/species/"],"id":126638048}]}

现在,您可以将JSON源网址传递给http://jsonviewer.stack.hu/

http://jsonviewer.stack.hu/# {your url}

,最后的网址变为

http://jsonviewer.stack.hu/#http://refine.taxonomics.org/gbifchecklists/reconcile?query=Crepidomanes%20minutum

答案 1 :(得分:0)

我不了解在线观众,但自己写一下并不是什么大问题,例如用PHP。

使用以下代码创建viewer.php脚本:

if (isset($_GET['json'])) {
    echo '<pre>';
    print_r(json_decode($_GET['json']));
    echo '</pre>';
}

并按照您的意愿使用它:

http://youserver.com/viewer.php?json={"foo":"bar"}

输出将如下:

stdClass Object
(
    [foo] => bar
)

答案 2 :(得分:0)

blinkJ JSON viewer可能可以解决您的问题。您可以直接与链接共享内容。 “分享”按钮位于查看器面板上方。

请注意,普通的JSON字符串不是URL安全的,需要进行编码。

完全披露:我是这个工具的作者,因为我找不到任何可以轻松处理50KB JSON数据的在线工具。它仍然通过GitHub积极开发并欢迎任何功能需求或问题报告。

希望这有帮助。