require 'crack'
class Launcher
def initialize
end
def run
strj = "{\"budget_start\":\"2014-02-28\",\"budget_end\":\"2014-02-20\"}"
resp = Crack::JSON.parse(strj);
print "\n"
end
end
l = Launcher.new
l.run
It produces "Invalid JSON string" exception.
Replace the strj string to:
strj = "{\"budget_start\":\"2014-02-28\",\"budget_end\":\"2014\"}"
It works fine.
Run the following code:
It produces "Invalid JSON string" exception. Replace the strj string to:
strj = "{\"budget_start\":\"2014-02-28\",\"budget_end\":\"2014\"}"
It works fine.