B4J Question How to set variable values in JOSON files and What are the types of types in the Joson file? THANKS

guandjy

Member
How to set variable values in JOSON files:
B4XTable1.AddColumn(Main.b & "月份计划", B4XTable1.COLUMN_TYPE_TEXT)


 {
            "title": "12月份计划",
            "type": "Text",
            "key": "12月份计划",
            "required": true
        },
 
Solution
There is an online JSON Tree tool available for : http://basic4ppc.com:51042/json/index.html which gives you this code:
JSON Tree Example:
Dim parser As JSONParser
parser.Initialize(<text>)
Dim jRoot As Map = parser.NextObject
Dim title As String = jRoot.Get("title")
Dim type As String = jRoot.Get("type")
Dim key As String = jRoot.Get("key")
Dim required As String = jRoot.Get("required")
Explanation for the JsonTree - Tool to help with JSON parsing (B4A / B4J)

MicroDrie

Well-Known Member
Licensed User
There is an online JSON Tree tool available for : http://basic4ppc.com:51042/json/index.html which gives you this code:
JSON Tree Example:
Dim parser As JSONParser
parser.Initialize(<text>)
Dim jRoot As Map = parser.NextObject
Dim title As String = jRoot.Get("title")
Dim type As String = jRoot.Get("type")
Dim key As String = jRoot.Get("key")
Dim required As String = jRoot.Get("required")
Explanation for the JsonTree - Tool to help with JSON parsing (B4A / B4J)
 
Upvote 0
Solution
Top