Refactor and optimize C++ JSON validator (MIIIIIW)#1
Open
MliliGenes wants to merge 1 commit intoHayoun01:mainfrom
Open
Refactor and optimize C++ JSON validator (MIIIIIW)#1MliliGenes wants to merge 1 commit intoHayoun01:mainfrom
MliliGenes wants to merge 1 commit intoHayoun01:mainfrom
Conversation
This commit introduces several improvements to the C++98 JSON parser and validator library. - **Build System:** Added a Makefile to automate the build process, replacing the manual compilation command. This also resolves an unconventional `#include` of a .cpp file. - **Code Structure:** Separated the schema definition into a header (`schema.hpp`) and implementation file (`schema.cpp`) for better modularity. - **Code Quality:** - Fixed compiler warnings by explicitly initializing the base class in all validator copy constructors. - Refactored the `match_token_name` function to use a `switch` statement for improved readability and performance. - **Parser Robustness:** Optimized the `extract_json_types` function to be more correct and robust by checking for keywords character-by-character and properly handling mismatches and stream state.
Owner
|
can you plz gitignore your objects 🐱 |
Author
|
should be good, i am rebuilding this with C, cause c is better |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces several improvements to the C++98 JSON parser and validator library.
#includeof a .cpp file.schema.hpp) and implementation file (schema.cpp) for better modularity.match_token_namefunction to use aswitchstatement for improved readability and performance.extract_json_typesfunction to be more correct and robust by checking for keywords character-by-character and properly handling mismatches and stream state.