Comments (6)
looks like it's up on cran now:
> cat(toJSON(list(a="hello", b=c(1,2,99)), indent=4))
{
"a":"hello",
"b":[
1,
2,
99
]
}
from rjson.
This seems like a very reasonable request, perhaps we can have an optional indent
argument, which would be similar to python's pprint indent argument. When specified, list items will be printed on separate lines with the appropriate level of indentation.
In terms of using json on the command line, take a look at the jq program; e.g. cat data.json | jq . | grep foo
from rjson.
optional indent
Yes that would be perfect !
jq
Thank you for reminding me of this useful program. Does not really solve the grep -r
use case though.
from rjson.
feature implemented in 6130db1
from rjson.
I'll close this ticket once it's up on cran, cheers.
from rjson.
from rjson.
Related Issues (20)
- wired result (with NA involved) HOT 1
- Convert strings with javascript escaped unicode properly HOT 5
- unsupported SEXPTYPE: 19 HOT 6
- Feature request: integer types HOT 4
- [minor] couple of compiler warnings HOT 1
- [feature request] support for bit64::integer64 HOT 1
- fromJSON successfully parses incorrect test HOT 1
- incorrect simplify docs
- investigate "String is not utf8" error on what appears to be valid utf8 data HOT 1
- convert emoji characters. HOT 1
- `fromJSON` Crash With Bad Input HOT 1
- not all data parsed check introduces regression
- fix protect/unprotect rchk issues HOT 4
- v3.6.3 version? HOT 2
- Read smart contacts with rjson HOT 4
- Enhancement: Import Just a Subset of a JSON File HOT 1
- Add a simplify option to fromJSON to keep json list structure HOT 2
- fromJSON does not error on multiple json objects
- fromJSON: Manually set how null is handled (like jsonlite) 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 rjson.