-1
使用JsonFX我将json流加载到我的应用程序中。 json为其中一个对象使用URL,所以使用默认的访问对象的动态方式不起作用,因为某些URL中的字符对于成员名称无效。
http://opendatacommunities.org/doc/geography/lsoa/E01004700.json使用无效名称访问动态对象?
{
'http://opendatacommunities.org/id/geography/lsoa/E01004700': {
'http://data.ordnancesurvey.co.uk/ontology/spatialrelations/easting': [
{
type: 'literal',
value: '526252',
datatype: 'http://www.w3.org/2001/XMLSchema#integer'
}
],
'http://www.w3.org/2003/01/geo/wgs84_pos#lat': [
{
type: 'literal',
value: '51.51349',
datatype: 'http://www.w3.org/2001/XMLSchema#decimal'
}
],
'http://statistics.data.gov.uk/def/administrative-geography/district': [
{
type: 'uri',
value: 'http://statistics.data.gov.uk/id/local-authority-district/00BK'
}
],
'http://opendatacommunities.org/def/geography#boundaryAsJSON': [
{
type: 'uri',
value: 'http://opendatacommunities.org/lsoa_boundaries/E01004700.json'
}
],
'http://data.ordnancesurvey.co.uk/ontology/spatialrelations/northing': [
{
type: 'literal',
value: '180964',
datatype: 'http://www.w3.org/2001/XMLSchema#integer'
}
],
'http://www.w3.org/2003/01/geo/wgs84_pos#long': [
{
type: 'literal',
value: '-0.18198',
datatype: 'http://www.w3.org/2001/XMLSchema#decimal'
}
],
'http://www.w3.org/2004/02/skos/core#notation': [
{
type: 'literal',
value: 'E01004700'
}
],
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type': [
{
type: 'uri',
value: 'http://opendatacommunities.org/def/geography#LSOA'
}
],
'http://www.w3.org/2000/01/rdf-schema#label': [
{
type: 'literal',
value: 'Westminster 016E'
}
],
'http://www.w3.org/2002/07/owl#sameAs': [
{
type: 'uri',
value: 'http://statistics.data.gov.uk/id/statistical-geography/E01004700'
}
]
}
}
有没有办法,我可以访问该对象的方法吗?
我只能想到如此快速的预分析并用其他的东西替换问题字符。 – 2012-08-07 13:05:19