File tree 1 file changed +18
-15
lines changed
1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
json_parse.js
3
- 2011-03-06
3
+ 2012-06-20
4
4
5
5
Public Domain.
6
6
@@ -160,7 +160,8 @@ var json_parse = (function () {
160
160
if ( ch === '"' ) {
161
161
next ( ) ;
162
162
return string ;
163
- } else if ( ch === '\\' ) {
163
+ }
164
+ if ( ch === '\\' ) {
164
165
next ( ) ;
165
166
if ( ch === 'u' ) {
166
167
uffff = 0 ;
@@ -326,21 +327,23 @@ var json_parse = (function () {
326
327
// in an empty key. If there is not a reviver function, we simply return the
327
328
// result.
328
329
329
- return typeof reviver === 'function' ? ( function walk ( holder , key ) {
330
- var k , v , value = holder [ key ] ;
331
- if ( value && typeof value === 'object' ) {
332
- for ( k in value ) {
333
- if ( Object . prototype . hasOwnProperty . call ( value , k ) ) {
334
- v = walk ( value , k ) ;
335
- if ( v !== undefined ) {
336
- value [ k ] = v ;
337
- } else {
338
- delete value [ k ] ;
330
+ return typeof reviver === 'function'
331
+ ? ( function walk ( holder , key ) {
332
+ var k , v , value = holder [ key ] ;
333
+ if ( value && typeof value === 'object' ) {
334
+ for ( k in value ) {
335
+ if ( Object . prototype . hasOwnProperty . call ( value , k ) ) {
336
+ v = walk ( value , k ) ;
337
+ if ( v !== undefined ) {
338
+ value [ k ] = v ;
339
+ } else {
340
+ delete value [ k ] ;
341
+ }
339
342
}
340
343
}
341
344
}
342
- }
343
- return reviver . call ( holder , key , value ) ;
344
- } ( { '' : result } , '' ) ) : result ;
345
+ return reviver . call ( holder , key , value ) ;
346
+ } ( { '' : result } , '' ) )
347
+ : result ;
345
348
} ;
346
349
} ( ) ) ;
You can’t perform that action at this time.
0 commit comments