[GB.UTIL.WEB]

* NEW: Always initialise JSON.Null, so that an entry in a JSONCollection with value JSON.Null appears in the Encode() string.



git-svn-id: svn://localhost/gambas/trunk@7737 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Tobias Boege 2016-04-11 17:04:36 +00:00
parent 5ad88d32a5
commit 446af60cc1
2 changed files with 10 additions and 1 deletions

View File

@ -12,6 +12,10 @@ Null
R
v
_init
M
Decode
M
v

View File

@ -9,6 +9,12 @@ Private $sStr As String
Private $iPos As Integer
Private $bUseNull As Boolean
Public Sub _init()
$vNull = VarPtr($vNull)
End
Private Sub GetChar() As String
Dim sCar As String
@ -260,7 +266,6 @@ Public Sub Decode(JSONString As String, Optional UseNull As Boolean) As Variant
$sStr = JSONString
$iPos = 1
$bUseNull = UseNull
If UseNull And If IsNull($vNull) Then $vNull = VarPtr($vNull)
vVal = ReadValue()
$bUseNull = False
$sStr = ""