Skip to content

500Foods/TMS-WEB-Core-JsonPrimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMS-WEB-Core-JSON-Primer

This repository contains various code samples that first appeared in TMS Blog posts about using JSON within TMS WEB Core. The original posts can be found in Part 1 and Part 2 and were first posted on May 5th and 6th, 2022.

/Combined contains the code for Examples 2-31, where the JavaScript, Delphi and TMS WEB Core variations are combined in each example. /Delphi, /JavaScript, and /TMS WEB Core contain simplified versions of Examples 2-24, where only the specific variation is included, for those interested in just the one variation.

  • 02 : Defining Objects
  • 03 : Loading JSON Sample Data
  • 04 : Accessing JSON Object Values
  • 05 : Accessing JSON Array Values
  • 06 : Counting JSON Object Elements
  • 07 : JSON Array Length
  • 08 : Checking JSON Object Types
  • 09 : Check if JSON Object Contains a Key
  • 10 : Find String in JSON Array
  • 11 : Find Key in JSON Array
  • 12 : Adding Strings to a JSON Object
  • 13 : Adding Strings to a JSON Array
  • 14 : Adding Other Types to a JSON Object
  • 15 : Delete JSON Object Element
  • 16 : Delete JSON Array String Element
  • 17 : Delete JSON Array Key
  • 18 : Update JSON Object Element
  • 19 : Duplicate JSON Object Keys
  • 20 : Relative Performance
  • 21 : Iterate through JSON Object Elements
  • 22 : Traverse Entire JSON Object
  • 23 : Compare JSON
  • 24 : Sort JSON Object Elements
  • 25 : Move from JS to WC or PAS
  • 26 : Move from WC to JS or PAS
  • 27 : Move from PAS to JS or WC
  • 28 : FireDAC to JSON (Simple)
  • 29 : FireDAC to JSON (Complex)
  • 30 : JSON to TDataset (Simple)
  • 31 : JSON to TDataset (Complex)

If you have ideas for improvements to any of the Examples or would like some examples of other functionality using JSON within TMS WEB Core projects, or if you find issues with any of the examples posted, by all means please post an Issue or a Discussion item.

Key Dependencies

While a solid understanding of JSON would help here, the point of the repository is to help understand how to use JSON in a TMS WEB Core or other Delphi project, potentially at a very basic level. As a result, there is only one key dependency to be aware of.

Repository Information

Count Lines of Code

Last Updated at 2023-12-24 05:09:34 UTC
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Pascal                          99            458           1040           1989
Markdown                         2             43              2            153
YAML                             2              8             12             33
-------------------------------------------------------------------------------
SUM:                           103            509           1054           2175
-------------------------------------------------------------------------------

Sponsor / Donate / Support

If you find this work interesting, helpful, or valuable, or that it has saved you time, money, or both, please consider directly supporting these efforts financially via GitHub Sponsors or donating via Buy Me a Pizza. Also, check out these other GitHub Repositories that may interest you.

More TMS WEB Core and TMS XData Content

If you're interested in other TMS WEB Core and TMS XData content, follow along on 𝕏 at @WebCoreAndMore, join our 𝕏 Web Core and More Community, or check out the TMS Software Blog.

About

Code library showing examples of how to use JSON within TMS WEB Core applications.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages