B4A Question JSONGenerator Issue - iCAB    
Jun 8, 2025 )
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(Map1)
Log( JSONGenerator.ToString )
output
{"ClosedByToken":"null","ShiftEnd":"null...
link: : TRegisterShiftRecord1.lngLastUpdated )
Dim JSONGenerator As JSONGenerator
Dim JSONstring...
link:
I do remember an oddball case a few months back where a Null was passed via a function parameter
...
link:
ClosedByID and ShiftEnd are part of a defined type.
If that is the case and you are only construc...
B4J Question BVAD3 jsonparser jsongenerator missing - Erel (first post)    
Nov 10, 2024Add a reference to the Json library....
link: type: jsongenerator<br />Are you missing a library reference...
B4A Tutorial Android JSON tutorial - Erel    
Feb 7, 2021   
(13 reactions)   
tags: Json in a similar way. We create a Map or a List that holds the values and then using JSONGenerator we... JSONGenerator As JSONGenerator
JSONGenerator.Initialize2(Data)
Msgbox(JSONGenerator.ToPrettyString(2), "")
JSONGenerator can be initialized with a map or a list.
Converting the data to...
B4A Question JSONGenerator.To(Pretty)String sequence different from map? - KMatle    
Sep 9, 2014I mentioned that the sequence of the generated ToString or ToPrettyString is different from the key/values in the map used.
Examples
Map:
key1, value1
key2, value2
key3, value3
...
...
keyn, valuen
After JSONGenerator.Initialize(MyMap) & "ToString" or "ToPrettyString"...
link: Ok, good to know....
link: Generally speaking maps (or hashtables) data structures do not have any specific order. B4A Map does have a consistent order. However...
B4A Question JSonGenerator - COBRASoft    
Jan 8, 2012Hi,
I need the JSonGenerator to produce JSon like shown below. How can I achieve these examples with list/map/type? I sometimes need 5 or 6 variables within a record, so I though a type would...
link: How do you create this string?...
link: Map and List working perfectly!
My dates '/Date(123456...)/' are not including the timeoffs...
link: There is no standard date type in JSON. There are some conventions. However it shouldn't be diff...
B4J Question Can Escaping be disabled in JSONGenerator ? - Erel (first post)    
Apr 6, 2020   
(2 reactions)Note that the escaped output is valid. Which problem are you trying to solve?...
link: )
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(Map1...
link: : "admin"))
Private JSONGenerator As JSONGenerator
JSONGenerator.Initialize(root...
link: you could do it by hand (like you did), but it might not be readable on the other end. escaping cer...
B4J Question JSONGenerator - madru (first post)    
Apr 3, 2020   
(5 reactions)
Nice illustrations, how did you make them?
https://json.bloople.net...
link: Nice illustrations, how did you make them?...
link: Thx Erel, appreciate your help as always
I missed the 'Array' adding the objects, ended up ...
link: : 1234, ...
DIm jg As JsonGenerator
jg.Initialize(m)
log(jg.ToPrettyString(4))
...
B4A Question JsonGenerator Not escaping raw data - FrostCodes (first post)    
Mar 4, 2020Hi @Erel thanks , actually my JSON data contained unprintable characters and this was the cause of the issue...
link: Works fine:
Dim jg As JSONGenerator
jg.Initialize(CreateMap($"te"st"$: $"...
link: I found out that JsonGenerator doesn't escape quotes( " and ' ) and / . Please how...
B4J Question JSONGenerator issue - Multiverse app (first post)    
Jan 29, 2020   
(1 reaction)Thanks for the follow-through.
or some variant of datetoString()
Nah, it accepts any string (actua...
link: why don't you just put "1580231536493" as a string like it wants? (or some variant of...
link:
is your 1580231536493 not supposed to be a string? the template seems to indicate so... it look...
link: is your 1580231536493 not supposed to be a string? the template seems to indicate so... it looks...
B4A Question help with jsongenerator - apty (first post)    
Apr 23, 2018Thanks a lot. It works fine...
link:
Dim m As Map = CreateMap("get": "Slim", _
"properties": Array( _
Cr...
link: Create a Map
Add the get Property to the Map
Add a List to the Map containing Maps for the inner &qu...
link: I need help in generating the json string below with jsongenerator. Please assist
{
"get...
Page: 1  
2  
3  
4  
5  
6  
7