Comments (2)
the syntax of your command is wrong:
echo $"EVENT"
=> EVENT
echo "$EVENT"
=> {
...json
}
cheers, Dominic
On Thu, Nov 8, 2012 at 7:00 PM, flenzi [email protected] wrote:
EVENT='{
"event": {
"timestamp":"2011-06-26T21:26:26.679Z",
"beacon":"urn:example:xyz:web:11234",
"context":"http://www.example.org/",
"object":"http://www.example.org/about/Pages/default.aspx",
"subject":"urn:example:tid:745623",
"action":"urn:example[image: 🔤]page-view",
"platform":"urn:example:plat:web:Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1)",
"client_ip":"123.45.67.8",
"request": {
"method":"GET",
"url":"http://www.example.org/about/Pages/default.aspx",
"headers": {
"user-agent":"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)",
"accept-encoding":"gzip",
"accept-language":"en-US,en"
}
},
"response": {
"status":"201"
}
}
}
'EVENT_PARSED=$(echo $"EVENT" | JSON.sh)
echo $EVENT_PARSEDThrows me: "EXPECTED value GOT E"
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/14.
from json.sh.
My bad.
Thanks for the answer
from json.sh.
Related Issues (20)
- Parse failure triggering error: EXPECTED EOF GOT { HOT 3
- Is there a bug in line 156 to l65 HOT 2
- Brilliant!!! HOT 10
- Forward slash escaping HOT 2
- Getting "EXPECTED value GOT EOF" for any kind of JSON in Cygwin HOT 9
- error
- escaping and sign quote HOT 2
- return as environment variable HOT 5
- Remove all global variables? HOT 7
- Parsing owncloud logfile, EXPECTED EOF GOT { HOT 2
- JSON.sh cannot parse strings with the character DEL 0x7F inside HOT 1
- JSON.sh does crash when parsing numerous nested structures HOT 1
- Tokenize fails with busybox 1.11.2 HOT 2
- Dev missed out on legendary opportunity... HOT 1
- Parse files with byte-order-mark
- Does Not Work on CircleCI
- use grep -E
- New line in json does not work HOT 2
- JSON reading by using shell script with out jq HOT 1
- How to speed up json parsing ?
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 json.sh.