You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/01 16:35:00 UTC
[jira] [Commented] (ANY23-378) JsonParseException
[ https://issues.apache.org/jira/browse/ANY23-378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565593#comment-16565593 ]
ASF GitHub Bot commented on ANY23-378:
--------------------------------------
GitHub user HansBrende opened a pull request:
https://github.com/apache/any23/pull/108
ANY23-378 clean commas in JSON-LD
Remove trailing commas from objects and arrays. Also replace semicolons with commas (compare to gson's `JsonReader.setLenient()`).
mvn clean test -> all tests passed
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HansBrende/any23 ANY23-378
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/any23/pull/108.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #108
----
commit aae21370e70715f82f7cc868b9a298f1178d0f80
Author: Hans <fi...@...>
Date: 2018-08-01T16:25:21Z
ANY23-378 clean commas in JSON-LD
----
> JsonParseException
> ------------------
>
> Key: ANY23-378
> URL: https://issues.apache.org/jira/browse/ANY23-378
> Project: Apache Any23
> Issue Type: Bug
> Components: extractors
> Affects Versions: 2.3
> Reporter: Hans Brende
> Priority: Major
> Fix For: 2.3
>
>
> On the page http://golfavisen.dk/golfavisen-award-2018/ I'm getting a JsonParseException in the EmbeddedJSONLDExtractor:
> {noformat}
> org.apache.any23.extractor.ExtractionException: Error while parsing RDF document.
> at org.apache.any23.extractor.rdf.BaseRDFExtractor.run(BaseRDFExtractor.java:175)
> at org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.extractJSONLDScript(EmbeddedJSONLDExtractor.java:149)
> at org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.run(EmbeddedJSONLDExtractor.java:83)
> at org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.run(EmbeddedJSONLDExtractor.java:54)
> at org.apache.any23.extractor.SingleDocumentExtraction.runExtractor(SingleDocumentExtraction.java:480)
> at org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:259)
> at org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:323)
> at org.apache.any23.extractor.html.AbstractExtractorTestCase.extract(AbstractExtractorTestCase.java:189)
> at org.apache.any23.extractor.html.AbstractExtractorTestCase.assertExtract(AbstractExtractorTestCase.java:204)
> ... 28 more
> Caused by: org.eclipse.rdf4j.rio.RDFParseException: Could not parse JSONLD
> at org.eclipse.rdf4j.rio.jsonld.JSONLDParser.parse(JSONLDParser.java:77)
> at org.apache.any23.extractor.rdf.BaseRDFExtractor.run(BaseRDFExtractor.java:171)
> ... 36 more
> Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('}' (code 125)): was expecting double-quote to start field name
> at [Source: (BufferedReader); line: 9, column: 10]
> at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
> at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663)
> at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:561)
> at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddName(ReaderBasedJsonParser.java:1757)
> at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextFieldName(ReaderBasedJsonParser.java:907)
> at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:512)
> at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
> at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
> at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3972)
> at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2264)
> at com.fasterxml.jackson.core.JsonParser.readValueAs(JsonParser.java:1729)
> at com.github.jsonldjava.utils.JsonUtils.fromJsonParser(JsonUtils.java:196)
> at com.github.jsonldjava.utils.JsonUtils.fromReader(JsonUtils.java:173)
> at com.github.jsonldjava.utils.JsonUtils.fromInputStream(JsonUtils.java:154)
> at com.github.jsonldjava.utils.JsonUtils.fromInputStream(JsonUtils.java:111)
> at org.eclipse.rdf4j.rio.jsonld.JSONLDParser.parse(JSONLDParser.java:71)
> ... 37 more
> {noformat}
> caused by the following json:
> {noformat}
> { "@context": "http://schema.org",
> "@type": "Event",
> "name": "PINNACLE BANK CHAMPIONSHIP",
> "startDate": "2018-7-19T00-00-00-00",
> "endDate": "2018-7-19T23-23-59-00",
> "image":"http://golfavisen.dk/wp-content/uploads/2017/03/WEB.png",
> "description":"PINNACLE BANK CHAMPIONSHIP",
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)