New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not expose internal state in the public encoder API (i.e. as_json) #12785

Merged
merged 2 commits into from Nov 7, 2013
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Diff settings

Always

Just for now

Next

Moved AS::JSON::DATE_REGEX as it's only used for decoding

  • Loading branch information...
chancancode committed Nov 6, 2013
commit 6da5ff45c6d69912fb96870f31aaf0c0590fa212
@@ -7,6 +7,9 @@ module ActiveSupport
mattr_accessor :parse_json_times
module JSON
# matches YAML-formatted dates
DATE_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/
class << self
# Parses a JSON string (JavaScript Object Notation) into a hash.
# See www.json.org for more info.
@@ -21,9 +21,6 @@ class << self
end
module JSON
# matches YAML-formatted dates
DATE_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[T \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/
# Dumps objects in JSON (JavaScript Object Notation).
# See www.json.org for more info.
#
ProTip! Use n and p to navigate between commits in a pull request.