Skip to content

Prototype 2: Evaluating alternatives to YAJL for JSON processing#3540

Open
Easton97-Jens wants to merge 11 commits intoowasp-modsecurity:v3/masterfrom
Easton97-Jens:v3/master-json2
Open

Prototype 2: Evaluating alternatives to YAJL for JSON processing#3540
Easton97-Jens wants to merge 11 commits intoowasp-modsecurity:v3/masterfrom
Easton97-Jens:v3/master-json2

Conversation

@Easton97-Jens
Copy link
Copy Markdown
Contributor

what

This pull request introduces the second prototype for evaluating alternatives to YAJL in JSON processing.

The prototype has been reduced to the following JSON libraries:

  • SIMDJSON
  • JSONCONS

As part of this change, YAJL has been completely removed.

why

The goal of this prototype is to continue the evaluation of possible improvements to JSON handling in terms of:

  • maintainability
  • performance
  • security
  • modernization of dependencies

By removing YAJL entirely and reducing the number of candidate libraries, this prototype provides a more focused base for validation, comparison, and further development.

references

Complete implementation simdjson

Complete implementation jsoncons

remove analysis

Initialize ret variable to zero in UnitTestResult

fix test

Fix validateByteRange and cssDecode unit test edge cases

complete jsoncons

performance adjustment

sonarqubecloud error corrected
sonarqubecloud error corrected

Refactor JSONAdapter parse method to use parseImpl

Refactor JSONAdapter parse methods to remove adapter parameter

Add parseImpl method to json_adapter.h

Refactor JSON field handling in regression tests

Refactor JSON field processing by introducing a reusable for_each_json_field function. This change simplifies the code in multiple update functions by eliminating redundant logic.

Refactor parsing functions for improved validation

Cleanup: Remove unused parsing functions

Removed unused functions related to parsing and scenario building in json_benchmark.cc.

Improve benchmark output and add bilingual benchmark docs

Apply minimal Sonar-focused fixes in benchmark parser/script

Measure benchmark timer only around transaction loop

Revisit JSON Sonar follow-ups for adapter and enum handling

Reduce duplicated JSON backend control-flow blocks

fix: probably UB (left shift of neg. val) in ip_tree

fix: nullptr dereference in seclang scanner

fix: unhandled exception in parser

Deduplicate shared JSON backend helper functions
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant