Comments (9)
I just noticed that you said in #1 that you won't support newlines in JSON. That at least seems worth documenting, and perhaps including in the error message.
(Note I'm using the Homebrew version, which doesn't has an empty --help
:
Usage of jsonpp:
from jsonpp.
I had this issue too. Accepting newlines or giving a better error message would be great
from jsonpp.
I also get an empty help message with --help (using homebrew) and I think it would be nice to take already pretty json and keep it that way. I would like to be able to keep my json file pretty even though I'm still modifying it and not have to put everything on one line. If this is a feature that you'd support I'd be glad to help contribute back.
from jsonpp.
Yeah, I think in its current state the behavior is broken.
Piping in already pretty (or non-crunched) JSON via stdin results in an error... pretty unexpected...
from jsonpp.
I just run into this also. Is there a good reason for parsing each line instead of the whole input? The only use case i can come up with is indenting output where each line is a separate JSON string.
A workaround is to replace new lines, e.g:
curl ... | tr "\n" " " | jsonpp
from jsonpp.
Just went through the same exercise this afternoon, every file I tried to parse exited with:
ERROR: Broken json on line 1, char 2: unexpected end of JSON input
Context: {
Went back to jsonlint which thinks my JSON is just dandy.
It's documented, but it still seems like an odd behavior.
from jsonpp.
For people ending up here: try the program jq, e.g. cat file.json | jq .
from jsonpp.
@wader, thanks
from jsonpp.
from jsonpp.
Related Issues (12)
- jsonpp chokes on multiline input HOT 9
- Memory corruption backtrace HOT 9
- enums over and over HOT 1
- upx released jsonpp binary results Segmentation fault (core dumped)
- "brew install jsoncpp" installs wrong architecture
- So why do you call it fast? HOT 4
- sorting dictionary keys by name
- Reformat file with replacement
- Compatibility with future Go versions
- jsonpp prints empty usage with --help or -h are specified on command line HOT 2
- Thank You! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonpp.