Success. One other error on my part was that my files ended in .json not
.jsonld. `content_type` was using the file extension to get the right
³media type², so I needed to change them to .jsonld.

Thanks for your help.
jw
-- 
Dr. Jeffrey C. Witt
Philosophy Department
Loyola University Maryland
4501 N. Charles St.
Baltimore, MD 21210






On 5/26/15, 5:07 PM, "Andy Seaborne" <[email protected]> wrote:

>On 26/05/15 21:30, Jeffrey C. Witt wrote:
>> I'm getting an error when posting a json-ld file to Fuseki 2.0 as
>>follows:
>>
>>     echo "trying jsonld"
>>     ./s-post http://localhost:3030/ds/data default
>>     ~/WebPages/scta/public/pg-lon.json
>>     ./s-post http://localhost:3030/ds/data default
>>     ~/WebPages/scta/public/pp-sorb.json
>
> From the JSON-LD spec, MIME type registration, the file extension for
>JSON-LD is .jsonld
>
>s-post doesn't include (seems to have been forgotten) so you'll need to
>do it old school:
>
>curl -XPOST --data-binary @FILE.jsonld \
>       --header 'Content-type: application/ld+json \
>       'http://localhost:3030/ds/data?default'
>
>
>>
>>
>> I was under the impression Fuseki 2.0 supported json-ld, but when
>> execute this post commands I get the following error:
>
>It should
>
>Sorry about that.
>
>       Andy
>
>To patch s-post:
>
>Add just after $mtTurtle:
>
>$mtJsonLD           = 'application/ld+json'
>
>and add
>
>$fileMediaTypes['jsonld']   = $mtJsonLD
>
>after
>
>$fileMediaTypes['ttl']   = $mtTurtle
>
>>
>>     trying jsonld
>>
>>     
>>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
>>/net/http/header.rb:17:in
>>     `block in initialize_http_header': undefined method `strip' for
>>     nil:NilClass (NoMethodError)
>>
>>     from
>>     
>>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
>>/net/http/header.rb:15:in
>>     `each'
>>
>>     from
>>     
>>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
>>/net/http/header.rb:15:in
>>     `initialize_http_header'
>>
>>     from ./s-post:199:in `send_body'
>>
>>     from ./s-post:163:in `POST'
>>
>>     from ./s-post:422:in `cmd_soh'
>>
>>     from ./s-post:697:in `<main>'
>>
>> I have attached the json-ld file I'm trying to post.
>>
>> Any ideas what is happening? Am I wrong to think Fuseki can ingest this?
>> If so, any ideas how I can easily ingest json into my Fuseki server.
>>
>> Thanks
>


Reply via email to