parsing failing if file path is the json value
See original GitHub issuejackson version: 2.6.4
file: test.json
[{
"name": "my application",
"folder": "/usr/lib/myApp"
}]
code:
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(ALLOW_COMMENTS, TRUE); // tried other Features and combination, too.
JsonNode jsonNode = objectMapper.readTree("test.json");
System.out.println(jsonNode.asText());
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Parsing JSON from a file path is not working properly
The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string. You are feeding it a URL ......
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >A problem with parsing JSON files located at a specific address
Here is the situation: I have a bundle of JSON-files in a specific directory (actually, the content of each file is in JSON-format,...
Read more >Null in Parse JSON when Upload in Forms is Optional
Solved: I have a flow that is triggered when a user submits a response to a Microsoft Form. A user has the option...
Read more >Loading JSON data from Cloud Storage | BigQuery
If you include a generation number in the Cloud Storage URI, then the load job fails. When you load JSON files into BigQuery,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Come on, ‘readTree’ is overloaded, it also takes File and total 7 input types including String.
Please re-open.
@sreev ok. Glad you were able to find description of the intended argument type. Apologies for earlier rant.