Skip to content

Instantly share code, notes, and snippets.

@dsci
Created August 20, 2012 09:08
Show Gist options
  • Save dsci/3402509 to your computer and use it in GitHub Desktop.
Save dsci/3402509 to your computer and use it in GitHub Desktop.
Dumping JSON from NSTextField
def settings_save_clicked(sender)
settings = Setting.current
attributes = {
"api_endpoint" => "#{api_endpoint_field.stringValue}",
"user_name" => "#{user_name_field.stringValue}",
"api_key" => "#{api_key_field.stringValue}"
}
MultiJSON.dump(attributes)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment