The json returned by the sparql query is not valid; it contains a bare
token (valueType) which the JSON spec requires be wrapped in quotes. 
You weren't seeing this in your exhibit that loaded the json directly
because it was not loading the "properties" object which contained the
bare json.

When you're debugging, you need to be careful not change *anything* in
the inputs, since even seemingly innocuous changes (like removing the
properties object) may be significant.

On 12/6/2015 11:53 AM, Jay Gray wrote:
> This Exhibit 2 successfully processes a SPARQL query:
>     Exhibit-2-SPARQL
> <http://ontomatica.com/public_new/project/test/Exhibit_implementations/Exhibit_SPARQL/index_ex-2_SPARQL_.html>
>
> Here is the SPARQL query:
>     SPARQL query
> <http://data-gov.tw.rpi.edu/sparql?query-option=uri&query-uri=http%3A%2F%2Fdata-gov.tw.rpi.edu%2Fdemo%2Fstable%2Fdemo-92-datasets-exhibit.sparql&service-uri=&output=exhibit&tp=%22properties%22%3A+%7B+%22unique_id%22%3A%7B+valueType%3A+%22number%22%7D%7D%2C%22>
>
> The JSON output is valid JSON and is correctly processed in Exhibit 3:
>     Exhibit-3-JSON
> <http://ontomatica.com/public_new/project/test/Exhibit_implementations/Exhibit_SPARQL/index_ex-3_JSON_.html>
>
> However, when running SPARQL query in Exhibit 3, am getting this error
> message:
> ---
>   The JSON data file
>  
> http://data-gov.tw.rpi.edu/sparql?query-option=uri&query-uri=http%3A%2F%2Fdata-gov.tw.rpi.edu%2Fdemo%2Fstable%2Fdemo-92-datasets-exhibit.sparql&service-uri=&output=exhibit&tp=%22properties%22%3A+{+%22unique_id%22%3A{+valueType%3A+%22number%22}}%2C
>
>   contains errors =
>   JSON.parse: expected property name or '}' at line 1 column 32 of the
> JSON data
>   We will explain the error in details after this message.
> ---
>
> Here is the Exhibit 3 implementation.
>     Exhibit-3-SPARQL
> <http://ontomatica.com/public_new/project/test/Exhibit_implementations/Exhibit_SPARQL/index_ex-3_SPARQL_.html>
>
> What am I doing wrong?
> Note that the SPARQL query uses an output suffix coded as:
>    
> &service-uri=&output=exhibit&tp="properties":+{+"unique_id":{+valueType:+"number"}},
>
> Not sure if that is contributing to the error.
>
> Also note that these two expressions produce different results:
>     ex:columnFormat=number
>     data-ex-column-format=number
>
> Do I need to fix that in a schema.json file?
>
> /jay
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "SIMILE Widgets" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to simile-widgets+unsubscr...@googlegroups.com
> <mailto:simile-widgets+unsubscr...@googlegroups.com>.
> To post to this group, send email to simile-widgets@googlegroups.com
> <mailto:simile-widgets@googlegroups.com>.
> Visit this group at http://groups.google.com/group/simile-widgets.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to simile-widgets+unsubscr...@googlegroups.com.
To post to this group, send email to simile-widgets@googlegroups.com.
Visit this group at http://groups.google.com/group/simile-widgets.
For more options, visit https://groups.google.com/d/optout.

Reply via email to