Skip to content

Releases: RealTimeChris/Jsonifier

Release v1.0.0

07 Jun 04:21

Choose a tag to compare

Jsonifier Release v1.0.0

We are proud to present Jsonifier v1.0.0, a ultra-high-performance, header-only C++20/C++23 JSON parsing and serialization library utilizing advanced SIMD paradigms for exceptional data processing efficiency.

🚀 Key Features and Enhancements

🧠 Advanced Architecture & SIMD Hardware Detection

  • Runtime Capability Mapping: Added an integrated feature-detection system (CMake/main.cpp) derived from state-of-the-art vector processing architectures to identify and harness underlying CPU capabilities at compile and configuration time.
  • Multi-Architecture SIMD Target Support: Includes specialized code paths optimizing execution for x64, AVX (Advanced Vector Extensions), AVX2, AVX-512, and ARM-NEON architectures.
  • Manual Compiler Adjustments: Exposes full instruction routing controls via the JSONIFIER_CPU_FLAGS CMake variable, enabling explicit hardware target specification across MSVC, GCC, and Clang toolchains (e.g., -march=avx512, -march=avx2, -mfpu=neon, -mbmi, -mlzcnt, -mpopcnt).

📦 Flexible Initialization & Installation Pipelines

  • Vcpkg Package Manager Integration: Direct availability for frictionless dependency registration via the standard vcpkg install jsonifier ecosystem.
  • Modern CMake Integration: Seamless project ingestion through native FetchContent_Declare directives or local cloning via standalone configuration targets (jsonifier::Jsonifier).

⚡ Blazing-Fast Parsing & Performance Tweaks

  • Minified Data Optimization: Developers can selectively bypass structural whitespace scanning and dramatically accelerate parsing velocities when input characteristics are known beforehand, using explicit template specialization properties:
jsonifier.parseJson<jsonifier::parse_options{ .minified = true }>(obj, buffer);
  • Fault-Tolerant Partial Reads: Introduced structural reading allowances (.partialRead = true) which allow the engine to dynamically process partial JSON streams or map out-of-order keys without generating structural violations or aborting parsing pipelines.

🔮 Custom Behavior & Schema Manipulation

  • Extensible Struct Serialization Specialization: Complete behavioral customization via explicitly specialized template mappings for parser::impl and serialize_impl. This grants developers fine-grained override capabilities over deep type-conversions (such as specialized time-stamps or custom structures).
  • Dynamic Runtime Key Exclusion: Implemented native reflection interceptors via a reserved class member named jsonifierExcludedKeys. By inserting specific fields into this filtering set at runtime, those object keys are entirely omitted from output blocks generated during serializeJson operations.
  • Arbitrary / Schema-less JSON Resolution: Full mapping capabilities for completely unknown or structurally fluid inputs using jsonifier::raw_json_data. Allows developers to dynamically iterate, validate presence, extract values, and verify metadata on completely schema-less JSON bodies.

🎨 Structural Utilities & Formatting

  • JSON Minification Overloads: Built zero-allocation utility variations (jsonifier::minifyJson) capable of operating directly on string instances in-place or routing condensed streams directly into designated target buffers.
  • Prettification Customization: Added comprehensive structural layout expanders (jsonifier::prettifyJson) supporting variable indentation tracking and character padding configurations via a dedicated prettify_options configuration mapping block.

🛠️ Robust Diagnostic Verification & Errors

  • Detailed Error Reflection Engine: Built out a granular diagnostic system accessible via the .getErrors() core interface. Emits contextual, human-readable error messages detailing the missing token, data index offsets, source file origins, exact row:column coordinates, and full parent function trace context upon meeting invalid JSON structural data.

🧪 CI/CD Infrastructure Update

We have built out comprehensive continuous integration profiles verifying codebase integrity across multiple cross-compilation target backends using Address and Undefined Behavior sanitizers. Add the following action workflow schema to check compliance inside operational code branches:

name: Sanitizers
on:
  push:
    branches: [ "**" ]
  pull_request:
    branches: [ "**" ]
  workflow_dispatch:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            compiler: clang
            name: "Ubuntu Clang"
          - os: ubuntu-latest
            compiler: gcc
            name: "Ubuntu GCC"
          - os: macos-latest
            compiler: clang
            name: "macOS Clang"
          - os: macos-latest
            compiler: gcc
            name: "macOS GCC"
          - os: windows-latest
            compiler: msvc
            name: "Windows MSVC"

    runs-on: ${{ matrix.os }}
    name: Build on ${{ matrix.name }}
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Setup Clang (Ubuntu)
        if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang'
        run: |
          wget https://apt.llvm.org/llvm.sh
          chmod u+x llvm.sh
          DEV_VERSION=$(awk -F'[][]' '/LLVM_VERSION_PATTERNS/ {print $2}' llvm.sh | sort -n | tail -n 1)
          sudo ./llvm.sh $DEV_VERSION
          echo "CXX_BIN=/usr/bin/clang++-$DEV_VERSION" >> $GITHUB_ENV

      - name: Setup GCC (Ubuntu)
        if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'gcc'
        run: |
          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
          sudo apt-get update
          DEV_VERSION=$(apt-cache search '^g\+\+-[0-9]+$' | awk '{print $1}' | sort -V | tail -n 1 | sed 's/g++-//')
          sudo apt-get install -y gcc-$DEV_VERSION g++-$DEV_VERSION
          echo "CXX_BIN=/usr/bin/g++-$DEV_VERSION" >> $GITHUB_ENV

      - name: Setup Clang (macOS)
        if: matrix.os == 'macos-latest' && matrix.compiler == 'clang'
        run: |
          brew install llvm
          echo "CXX_BIN=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV

      - name: Setup GCC (macOS)
        if: matrix.os == 'macos-latest' && matrix.compiler == 'gcc'
        run: |
          brew install gcc
          GCC_VERSION=$(brew list --versions gcc | awk '{print $2}' | cut -d. -f1)
          echo "CXX_BIN=g++-$GCC_VERSION" >> $GITHUB_ENV

      - name: Setup MSVC (Windows)
        if: matrix.os == 'windows-latest'
        uses: ilammy/msvc-dev-cmd@v1

      - name: Configure CMake (Unix)
        if: runner.os != 'Windows'
        run: cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${{ env.CXX_BIN }} -DJSONIFIER_UNIT_TESTS=TRUE -DJSONIFIER_ASAN=TRUE -DJSONIFIER_UBSAN=TRUE

      - name: Configure CMake (Windows)
        if: runner.os == 'Windows'
        run: cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DJSONIFIER_UNIT_TESTS=TRUE -DJSONIFIER_ASAN=TRUE -DJSONIFIER_UBSAN=TRUE

      - name: Build
        run: cmake --build ./Build --config=Debug -v

      - name: Install
        run: |
          ${{ runner.os != 'Windows' && 'sudo' || '' }} cmake --install ./Build --config=Debug 
    
      - name: Run the Test (Unix)
        if: matrix.os != 'windows-latest'
        run: |
            sudo chmod +x /usr/local/bin/jsonifier_unit_tests
            sudo ASAN_OPTIONS=symbolize=1:detect_leaks=1 \
                ASAN_SYMBOLIZER_PATH=${{ env.LLVM_SYMBOLIZER }} \
                /usr/local/bin/jsonifier_unit_tests
    
      - name: Run the Test (Windows)
        if: matrix.os == 'windows-latest'
        run: |
            & "C:/Program Files (x86)/jsonifier/bin/jsonifier_unit_tests.exe"

Release v0.9.98

28 Nov 13:26

Choose a tag to compare

Release v0.9.98 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Removed dependence upon a compile-time script for CPU architecture selection.
  • Implemented partial reading/writing.
  • Added newly optimized float parsing algorithm.
  • Added a new tuple implementation to significantly reduce compile time.

Full Changelog: v0.9.97...v0.9.98

Release v0.9.97

13 Oct 11:59

Choose a tag to compare

Release v0.9.97 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Added likely/unlikely to a bunch of if/else statements.
  • Swapped std::copy_n for std::memcpy in a few places.
  • Moved a couple masks for the Neon functions out into global scope.
  • Replaced jsonifier_internal::const_iterator with jsonifier_internal::iterator.
  • Moved the vector of prettifier states out of the function scope to the prettifier classes' scope.
  • Separated jsonifier_internal::string_literal out into its own header.
  • Moved a bunch of string-utility functions out into the derailleur class.
  • Replaced the join function with combineLiterals.
  • Modified the logic of the parse_impl classes.
  • Implemented a compile-time jump table to improve parsing performance significantly.
  • Replaced the float/double parsing/serializing methods with more conformant version.
  • Modified the serializing code to no longer rely on hash-maps for serializing members.
  • Marked a bunch of additional functions as noexcept.
  • Added an ALWAYS_INLINE macro in addition to the INLINE one.

Release v0.9.96

04 Jul 14:41

Choose a tag to compare

Release v0.9.96 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Added support for directly prettifying the Json data as it's written.
  • Fixed a string parsing issue with sizes.
  • Added the ARM-NEON implementation for various string operations.
  • Added new simd-based hashmap implementation to improve key find-performance.
  • Added a new minimal-char-based hashmap implementation to improve key find-performance.

Release v0.9.95

03 May 21:22

Choose a tag to compare

Release v0.9.95 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Added support for Arm-Neon 128-bit SIMD intrinsics.
  • Modified some lines to correct cleanliness.
  • Updated the raw_json_data class to remove superfluous functions.
  • Updated some of the error_codes.
  • Modified the parser, validator, serializer, and minifier classes to reduce function call overhead.
  • Refactored the usage of ascii_classes to instead utilize the json_structural_type enumeration.
  • Modified the CPU-detection script.
  • Added a new compare function to accelerate string comparisons.
  • Added MSVC, CLANG and GNU macros.

Release v0.9.94

27 Dec 06:47

Choose a tag to compare

Release v0.9.94 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Implemented a prettify function that utilizes simd instructions.
  • Implemented a minify function that utilizes simd instructions.
  • Implemented a validate function that utilizes simd instructions.
  • Implemented a function for parsing/serializing into std::variant types.
  • Implemented a fix to a buffer-overflow.

Release v0.9.93

12 Dec 11:41

Choose a tag to compare

Release v0.9.93 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Refactored the simd_base classes' functions to use perfect forwarding.
  • Updated some types.
  • Fixed an issue related to parsing/serializing raw array types.
  • Implemented a jsonifier_value_t for parsing/serializing single values.
  • Updated the parsing and serializing string functions to utilize a fuller range of simd-types.

Release v0.9.92

27 Nov 23:12

Choose a tag to compare

Release v0.9.92 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Refactored the number-parsing functions to use lookup tables instead of subtraction operations.
  • Refactored the simd_string_reader class.
  • Refactored some functions with fold-expressions for manual loop unrolliing.
  • Refactored the toChars and parseNumber functions.
  • Removed some superfluous typedefs.
  • Testing new simd logic for string parsing.
  • Renamed some types to snake_case.
  • Refactored the jsonifier_core, parser, and serializer classes to utilize the CRTP.
  • Refactored the simd_structural_iterator and serialization_iterator classes to remain contained.

Release v0.9.91

06 Nov 17:03

Choose a tag to compare

Release v0.9.91 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Removed store and storeu functions from being class-contained to free-standing.
  • Removed unnecessary branch statements from serialize_impl functions.
  • Improved some of the preprocessor macros for setting architecture.
  • Replaced a function that uses intrinsics with a non-intrinsic (but more rapid) version.
  • Renamed parsestring to parseString,.
  • Fixed a heap-buffer-overflow issue on two of the comparison functions.
  • Added more implementation to the raw_json_data class.
  • Added a dedicated concepts namespace.
  • Added some string-to-number functions.
  • Split the parseNumber function into multiple specializations to improve performance.
  • Refactored the jsonifier_object_t and jsonifier_array_t related functions.
  • Refactored the AVX-types into a statically-operating class instead of a containing one, to improve performance.
  • Renamed a bunch of things.
  • Added the structural_index_vector and buffer_string classes for parsing performance.
  • Improved error output - for debugging the indices.
  • Implemented new serialization logic for strings.
  • New subtraction logic.
  • Reorganized some of the headers.

Release v0.9.9

08 Oct 02:30

Choose a tag to compare

Release v0.9.9 Pre-release
Pre-release

Hey everyone, just a new release with the following changes being primary:

  • Modified some concepts.
  • Modified the DetectArchitecture.cmake script.
  • Also adding a couple of concepts.
  • Implemented a bunch of compile-time loops instead of runtime ones.
  • Implemented a new find function for the string classes.
  • Also added a couple of concepts.
  • Removed a bunch of superfluous constructors/destructors/copy/move operators.
  • Updated some of the integer-postfixes.
  • Switched to camel-case for types, and concepts.
  • Modified the DetectArchitecture.cmake script.
  • Added the check for the lzcnt instruction.
  • Added a universal fallback tzcnt function.
  • Modified the string class.
  • Removed a few unnecessary explicit template parameters.
  • Implemented the new SelectMenuDefaultValues type.
  • Improved the ISADetection headers, by splitting it into multiple different headers.
  • Added an implementation for parsing tuple-array-types.
  • Moved the concepts out into their own header.