B4A Class CSBuilder, store in JSON format

Hello,

This class can parse JSON to generate CSBuilder.

Create a json string, save it in a file, add it to assets folder, and display it with this class.

All the CSBuilder capabilities are supported.

Comments in clsCSBuilderParser.bas and samples files explains the JSON structure.

spsp
 

Attachments

  • csbuilderparser.zip
    16.3 KB · Views: 130

spsp

Member
Licensed User
Hello,

Update v1.1

in the spans text, image and icon, it's possible to use subtitution for dynamic use.

CSBuilder JSON Substitution:
        LabelDisplay.Text=fcsBuilderParser.parseJSON(File.ReadString(File.DirAssets,Value & ".json") _
                                                    ,CreateMap("word1":"CSBuilder","word2":"JSON"))

when the parser reads {....} in a text span, it replaces it with the value found in the map (see sample_4)

spsp
 

Attachments

  • csbuilderparser.zip
    16 KB · Views: 124
Top