Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.33 KB | None | 0 0
  1. require 'time'
  2. put '/send_current_time' do
  3.   json_string = params[:json] #returns the expected string
  4.   json_object = JSON.parse json_string #thinks json_string is nil
  5.   json_string_length = json_string.length #I know because this also thinks so
  6.   time_string = json_object['time']
  7.   time_object = Time.parse time_string
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement