Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure parser returns hash #4474

Merged
merged 4 commits into from Apr 30, 2024
Merged

Make sure parser returns hash #4474

merged 4 commits into from Apr 30, 2024

Commits on Apr 30, 2024

  1. parser_json: Make sure return Hash

    It is wrong for Parser to return a record that is not Hash.
    Subsequent processing may result in errors.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    b010a09 View commit details
    Browse the repository at this point in the history
  2. parser_mgspack: make sure return Hash

    It is wrong for Parser to return a record that is not Hash.
    Subsequent processing may result in errors.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    8433ca7 View commit details
    Browse the repository at this point in the history
  3. in_http: support Parser yield

    in_http didn't support yield of Parser.
    The specification assumed that Parser could return Array.
    However, this is wrong. Parser shouldn't return Array.
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    4bf78e6 View commit details
    Browse the repository at this point in the history
  4. Add comment about limitation of filter_parser specification

    Config to reproduce:
    
        <source>
          @type sample
          tag test.array
          sample {"message": "[{\"k\":\"v\"}, {\"k2\":\"v2\"}]"}
        </source>
    
        <filter test.**>
          @type parser
          key_name message
          <parse>
            @type json
          </parse>
        </filter>
    
        <match test.**>
          @type stdout
        </match>
    
    Result:
    
        2023-03-21 23:24:52.004470792 +0900 test.array: {"k":"v"}
        2023-03-21 23:24:52.004470792 +0900 test.array: {"k":"v"}
        ...
    
    Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
    daipom committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    6cace97 View commit details
    Browse the repository at this point in the history