You can translate the question and the replies:

JSON Resource cannot be created due to problem with charset?

When creating the base view of a new JSON resource I get this error: ( ISO-8859-1) ``` Unable to obtain the data structure: com.denodo.util.exceptions.InternalErrorException: Unexpected character ('­' (code 173)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source:; line: 1, column: 2] ``` ![Alternative image shows different unexpected character]( I tried with Postman to see if there is a problem with the request and there doesn't seem to be an issue. So I assume there is something wrong with the autodetection of the charset in Denodo, something which the browsers and Postman don't have an issue with. I tried fixing the encoding on UTF-8 and and I got the same error but different character. ``` com.denodo.util.exceptions.InternalErrorException: Unexpected character ('�' (code 65533 / 0xfffd)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') ``` How could I detect the encoding when it is not provided by the server in the response body, also unclear if the encoding can be forced via the Accept header.
05-12-2017 07:18:39 -0500

3 Answers

Hi, I used ‘GET’ method in the JSON data source with "Autodetect encoding" checkbox selected and created a base view over it without any issues. If the "Autodetect encoding" check box is selected, the Server will try to detect automatically the encoding of the file. The error might have occurred when the JSON file contains special characters. To overcome this issue, you must ensure to use a valid JSON structure and try to create a base view. For more information about this error, you could check the VDP.log file located in <Denodo-Home>/logs/vdp You can have a look at [JSON Sources]( and [Path Types in Virtual DataPort]( sections of Virtual DataPort Administration tool for further information. Hope this helps!
Denodo Team
06-12-2017 04:46:56 -0500
OK thanks for the info, I used the autodetect encoding as well, same issue. When I first download the JSON via the browser and add it as a local file resource, there is no issue and Denodo can create the datasource with the base view. When I look at the downloaded JSON file I do not see any strange characters even when I specifically look for the code 173 character (soft hyphen). the log message isn't much more verbose than the error message either ``` com.fasterxml.jackson.core.JsonParseException: Unexpected character ('­' (code 173)): expected a valid value ``` I checked the incoming HTTP packet via Wireshark and Wireshark does recognize the body as Javascript Object Notation Object, and even parses it in their log file and gives the hierarchical structure. The server is using Microsoft-IIS 8.5 with AspNet version 4.0.30319
06-12-2017 07:05:55 -0500
Include the below configurations in HTTP Headers for JSON response. * Content-Type: application/json * Accept: application/json Response is late, but sharing for the benefit of the others in the forum.
26-09-2019 05:19:10 -0400
You must sign in to add an answer. If you do not have an account, you can register here