Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Sep 22, 2023
2 parents 03f9bc2 + c45caa5 commit 8e77f7c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cmake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DJSONCONS_BUILD_TESTS=On -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON
- name: build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install_gcc
run: |
sudo apt update
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install_gcc
run: |
sudo apt update
Expand All @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install_gcc
run: |
sudo apt update
Expand All @@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install_gcc
run: |
sudo apt update
Expand All @@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install_gcc
run: |
sudo apt update
Expand All @@ -121,7 +121,7 @@ jobs:
# runs-on: ubuntu-18.04
#
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Install
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -70,7 +70,7 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -95,7 +95,7 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
20 changes: 20 additions & 0 deletions include/jsoncons/json_encoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,16 @@ namespace detail {
case semantic_tag::bigint:
write_bigint_value(sv);
break;
case semantic_tag::bigdec:
{
// output lossless number
if (options_.bigint_format() == bigint_chars_format::number)
{
write_bigint_value(sv);
break;
}
JSONCONS_FALLTHROUGH;
}
default:
{
sink_.push_back('\"');
Expand Down Expand Up @@ -1324,6 +1334,16 @@ namespace detail {
case semantic_tag::bigint:
write_bigint_value(sv);
break;
case semantic_tag::bigdec:
{
// output lossless number
if (options_.bigint_format() == bigint_chars_format::number)
{
write_bigint_value(sv);
break;
}
JSONCONS_FALLTHROUGH;
}
default:
{
sink_.push_back('\"');
Expand Down
4 changes: 2 additions & 2 deletions include/jsoncons_ext/jsonpath/expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3077,9 +3077,9 @@ namespace detail {

if ((options & result_options::path) == result_options::path)
{
auto callback = [&result](const json_location_type& path, reference)
auto callback = [&result](const json_location_type& pathp, reference)
{
result.emplace_back(path.to_string());
result.emplace_back(pathp.to_string());
};
evaluate(resources, root, path, instance, callback, options);
}
Expand Down
8 changes: 4 additions & 4 deletions include/jsoncons_ext/jsonpath/json_query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ namespace jsonpath {

jsoncons::jsonpath::detail::dynamic_resources<Json,reference> resources;

auto f = [&callback](const json_location_type& path, reference val)
auto f = [&callback](const json_location_type& pathp, reference val)
{
callback(path.to_string(), val);
callback(pathp.to_string(), val);
};
expr.evaluate_with_replacement(resources, instance, resources.root_path_node(), instance, f);
}
Expand All @@ -154,9 +154,9 @@ namespace jsonpath {

jsoncons::jsonpath::detail::dynamic_resources<Json,reference> resources{alloc_set.get_allocator()};

auto f = [&callback](const json_location_type& path, reference val)
auto f = [&callback](const json_location_type& pathp, reference val)
{
callback(path.to_string(), val);
callback(pathp.to_string(), val);
};
expr.evaluate_with_replacement(resources, instance, resources.root_path_node(), instance, f);
}
Expand Down

0 comments on commit 8e77f7c

Please sign in to comment.