Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Needs example with curl #8

coolaj86 opened this Issue · 7 comments

2 participants


How would I parse RESPONSE in this working example?

RESPONSE=`curl --silent ''`
echo ${RESPONSE}

Will you please put the example for this in your README?

P.S. and are a public echo servers I put up for just these sorts of occasions.


Well it's more of a JIT than a run-time compiler TBH, so I'm tempted to think it may be out-of-scope. But since Bash is perfectly capable of reflection and the runtime still has hooks to the compiler, it should be quite doable ... Let me think about it over the weekend. Thanks for the interest!

@kristopolous kristopolous was assigned

ok, I've thought about it ... I could pull it off with a function call ... I've written it and it seems to work. Do you have any suggestions on the name? I was thinking something like "tickEval" or "tickImport" or "tickParse" or something like that ... I want to make sure I pick the right semantics; api choices are very important.





JSON.parse or JSON.decode



I like tickParse because you're parsing it into an object. decode and load make sense in the context of marshaling / deserializing, but Bash JSON Parser sounds better than a Bash JSON decoder or Bash JSON Loader.


Way awesome job, btw.


Alright great. I'm working (cough cough for pay) right now ... but I'll be able to get back to this thing tonight. Thanks for the ideas!

@coolaj86 coolaj86 referenced this issue from a commit in coolaj86/TickTick
@coolaj86 coolaj86 [ISSUE #8] added Apache License 2, stated in README cb62ebe

Ignore my typo in that pull request, should have been 8.

In return for your work on the example I'll plaster plugs for this in at least 5 different places on stackoverflow asking about JSON parsing in bash for which this would be the solution. I have my tabs open and ready.


Fixed as of a0e08cb


There were a number of issues here, from having bare variable references, to hyphens in the names. They all had to be addressed and were taken care of.

The added function is as we have discussed, tickParse and is implemented here: .

It's a simple hack based on the existing system.

The "" has been renamed "" and a tests folder has been created. This tests folder has the json file from the example you gave along with a file named "" which essentially does what you asked for but does so locally, so that it can be ran without relying necessarily on the network or your server.

This commit also closes issue 10 which was opened to explain the only core change that was done here.

Thanks for your interest again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.