Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
renderjs
Commits
345a8461
Commit
345a8461
authored
Jan 18, 2013
by
Kazuhiko Shiozaki
Committed by
Ivan Tyagov
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add jquery-json that is now required istead of jstorage.
parent
8da3a307
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
lib/json/jquery.json.min.js
lib/json/jquery.json.min.js
+23
-0
No files found.
lib/json/jquery.json.min.js
0 → 100644
View file @
345a8461
/*! jQuery JSON plugin 2.4.0 | code.google.com/p/jquery-json */
(
function
(
$
){
'
use strict
'
;
var
escape
=
/
[
"
\\\x
00-
\x
1f
\x
7f-
\x
9f
]
/g
,
meta
=
{
'
\
b
'
:
'
\\
b
'
,
'
\t
'
:
'
\\
t
'
,
'
\n
'
:
'
\\
n
'
,
'
\
f
'
:
'
\\
f
'
,
'
\r
'
:
'
\\
r
'
,
'
"
'
:
'
\\
"
'
,
'
\\
'
:
'
\\\\
'
},
hasOwn
=
Object
.
prototype
.
hasOwnProperty
;
$
.
toJSON
=
typeof
JSON
===
'
object
'
&&
JSON
.
stringify
?
JSON
.
stringify
:
function
(
o
){
if
(
o
===
null
){
return
'
null
'
;}
var
pairs
,
k
,
name
,
val
,
type
=
$
.
type
(
o
);
if
(
type
===
'
undefined
'
){
return
undefined
;}
if
(
type
===
'
number
'
||
type
===
'
boolean
'
){
return
String
(
o
);}
if
(
type
===
'
string
'
){
return
$
.
quoteString
(
o
);}
if
(
typeof
o
.
toJSON
===
'
function
'
){
return
$
.
toJSON
(
o
.
toJSON
());}
if
(
type
===
'
date
'
){
var
month
=
o
.
getUTCMonth
()
+
1
,
day
=
o
.
getUTCDate
(),
year
=
o
.
getUTCFullYear
(),
hours
=
o
.
getUTCHours
(),
minutes
=
o
.
getUTCMinutes
(),
seconds
=
o
.
getUTCSeconds
(),
milli
=
o
.
getUTCMilliseconds
();
if
(
month
<
10
){
month
=
'
0
'
+
month
;}
if
(
day
<
10
){
day
=
'
0
'
+
day
;}
if
(
hours
<
10
){
hours
=
'
0
'
+
hours
;}
if
(
minutes
<
10
){
minutes
=
'
0
'
+
minutes
;}
if
(
seconds
<
10
){
seconds
=
'
0
'
+
seconds
;}
if
(
milli
<
100
){
milli
=
'
0
'
+
milli
;}
if
(
milli
<
10
){
milli
=
'
0
'
+
milli
;}
return
'
"
'
+
year
+
'
-
'
+
month
+
'
-
'
+
day
+
'
T
'
+
hours
+
'
:
'
+
minutes
+
'
:
'
+
seconds
+
'
.
'
+
milli
+
'
Z"
'
;}
pairs
=
[];
if
(
$
.
isArray
(
o
)){
for
(
k
=
0
;
k
<
o
.
length
;
k
++
){
pairs
.
push
(
$
.
toJSON
(
o
[
k
])
||
'
null
'
);}
return
'
[
'
+
pairs
.
join
(
'
,
'
)
+
'
]
'
;}
if
(
typeof
o
===
'
object
'
){
for
(
k
in
o
){
if
(
hasOwn
.
call
(
o
,
k
)){
type
=
typeof
k
;
if
(
type
===
'
number
'
){
name
=
'
"
'
+
k
+
'
"
'
;}
else
if
(
type
===
'
string
'
){
name
=
$
.
quoteString
(
k
);}
else
{
continue
;}
type
=
typeof
o
[
k
];
if
(
type
!==
'
function
'
&&
type
!==
'
undefined
'
){
val
=
$
.
toJSON
(
o
[
k
]);
pairs
.
push
(
name
+
'
:
'
+
val
);}}}
return
'
{
'
+
pairs
.
join
(
'
,
'
)
+
'
}
'
;}};
$
.
evalJSON
=
typeof
JSON
===
'
object
'
&&
JSON
.
parse
?
JSON
.
parse
:
function
(
str
){
return
eval
(
'
(
'
+
str
+
'
)
'
);};
$
.
secureEvalJSON
=
typeof
JSON
===
'
object
'
&&
JSON
.
parse
?
JSON
.
parse
:
function
(
str
){
var
filtered
=
str
.
replace
(
/
\\[
"
\\\/
bfnrtu
]
/g
,
'
@
'
).
replace
(
/"
[^
"
\\\n\r]
*"|true|false|null|-
?\d
+
(?:\.\d
*
)?(?:[
eE
][
+
\-]?\d
+
)?
/g
,
'
]
'
).
replace
(
/
(?:
^|:|,
)(?:\s
*
\[)
+/g
,
''
);
if
(
/^
[\]
,:{}
\s]
*$/
.
test
(
filtered
)){
return
eval
(
'
(
'
+
str
+
'
)
'
);}
throw
new
SyntaxError
(
'
Error parsing JSON, source is not valid.
'
);};
$
.
quoteString
=
function
(
str
){
if
(
str
.
match
(
escape
)){
return
'
"
'
+
str
.
replace
(
escape
,
function
(
a
){
var
c
=
meta
[
a
];
if
(
typeof
c
===
'
string
'
){
return
c
;}
c
=
a
.
charCodeAt
();
return
'
\\
u00
'
+
Math
.
floor
(
c
/
16
).
toString
(
16
)
+
(
c
%
16
).
toString
(
16
);})
+
'
"
'
;}
return
'
"
'
+
str
+
'
"
'
;};}(
jQuery
));
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment