Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Belgian Biodiversity Platform
yeti
Commits
c3d6626e
Commit
c3d6626e
authored
Apr 03, 2013
by
Julien Cigar
Browse files
allow encoding of null and undefined values too
parent
80e0438a
Changes
1
Hide whitespace changes
Inline
Side-by-side
core.js
View file @
c3d6626e
...
...
@@ -703,15 +703,21 @@
}
Yeti
.
Tools
.
Serializer
.
prototype
.
_encodeValue
=
function
(
key
,
value
)
{
if
(
value
!==
undefined
)
{
switch
(
value
.
constructor
)
{
case
Array
:
this
.
_encodeArray
(
key
,
value
);
break
;
default
:
this
.
_encodeString
(
key
,
value
);
break
;
}
switch
(
value
)
{
case
null
:
case
undefined
:
this
.
_encodeString
(
key
,
value
);
break
;
default
:
switch
(
value
.
constructor
)
{
case
Array
:
this
.
_encodeArray
(
key
,
value
);
break
;
default
:
this
.
_encodeString
(
key
,
value
);
break
;
}
break
;
}
}
...
...
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