[GB.WEB]
* BUG: JSON.Decode() now returns NULL if there is no token in the input string. git-svn-id: svn://localhost/gambas/trunk@3945 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
63dbda86ce
commit
354ccb681a
@ -1,8 +1,8 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 2.99.1
|
||||
# Compiled with Gambas 2.99.2
|
||||
Title=Web applications tools
|
||||
Startup=Main
|
||||
Version=2.99.1
|
||||
Version=2.99.2
|
||||
VersionProgram=gbx3 -V
|
||||
Authors="Benoît Minisini"
|
||||
TabSize=2
|
||||
|
@ -161,6 +161,8 @@ Private Sub ReadValue() As Variant
|
||||
Return True
|
||||
Else If sCar = "false" Then
|
||||
Return False
|
||||
Else If Not sCar Then
|
||||
Return
|
||||
Else
|
||||
Error.Raise("Incorrect token: " & Quote(sCar))
|
||||
Endif
|
||||
|
@ -60,18 +60,19 @@ End
|
||||
|
||||
Public Sub Main()
|
||||
|
||||
Dim hFile As File
|
||||
Dim aStr As Variant[] = ["la", ["nuit", "tous"], "les", "chats", [3, 4, 5], "sont", "gris"]
|
||||
Dim cCol As Collection = ["aspic": Pi, "camembert": aStr, "barbapapa": "Gambas !", "zut": String$(100, "Gambas")]
|
||||
|
||||
hFile = Open "~/serialize.txt" For Create
|
||||
Write #hFile, cCol As Variant
|
||||
Close #hFile
|
||||
|
||||
hFile = Open "~/serialize.txt" For Read
|
||||
cCol = Read #hFile As Variant
|
||||
Close #hFile
|
||||
|
||||
Print cCol.Count
|
||||
' Dim hFile As File
|
||||
' Dim aStr As Variant[] = ["la", ["nuit", "tous"], "les", "chats", [3, 4, 5], "sont", "gris"]
|
||||
' Dim cCol As Collection = ["aspic": Pi, "camembert": aStr, "barbapapa": "Gambas !", "zut": String$(100, "Gambas")]
|
||||
'
|
||||
' hFile = Open "~/serialize.txt" For Create
|
||||
' Write #hFile, cCol As Variant
|
||||
' Close #hFile
|
||||
'
|
||||
' hFile = Open "~/serialize.txt" For Read
|
||||
' cCol = Read #hFile As Variant
|
||||
' Close #hFile
|
||||
'
|
||||
' Print cCol.Count
|
||||
Print JSON.Decode(" ")
|
||||
|
||||
End
|
||||
|
Loading…
x
Reference in New Issue
Block a user