Skip to content
Myr

Added jsonEncode() and jsonDecode()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent a779a28 · Browse files · 1 file+24 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+24 added−0 removed

  • other:+24 added−0 removed

1 file+24 added−0 removed

modified:lib/express.core.js+24 added
178 unmodified lines
179 return hash180 },181 182 /**183 * JSON encode _object_184 *185 * @param {mixed} object186 * @return {string}187 * @api public188 */189 190 jsonEncode : function(object) {191 return JSON.stringify(object)192 },193 194 /**195 * JSON decode _string_.196 *197 * @param {string} string198 * @return {mixed}199 * @api public200 */201 202 jsonDecode : function(string) {203 return JSON.parse(string)204 },205 206 /**207 * Redirect to _url_.208 *209 * @param {string} url210 * @api public
419 unmodified lines