Skip to content

Commit

Permalink
chore: more meaningful sample
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Nov 29, 2023
1 parent 4f32f5a commit e9608f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void parsing()
std::cerr << "Parsing failed" << std::endl;
return;
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`
// Output: meojson
std::cout << value["repo"].as_string() << std::endl;
Expand Down Expand Up @@ -157,7 +157,7 @@ void parsing()
std::cerr << "Parsing failed" << std::endl;
return;
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`

// Output: MistEO
Expand Down
4 changes: 2 additions & 2 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void parsing()
std::cerr << "Parsing failed" << std::endl;
return;
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`
// Output: meojson
std::cout << value["repo"].as_string() << std::endl;
Expand Down Expand Up @@ -157,7 +157,7 @@ void parsing()
std::cerr << "Parsing failed" << std::endl;
return;
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`

// Output: MistEO
Expand Down
2 changes: 1 addition & 1 deletion sample/json5_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool parsing()
return false;
}//C-style strings can also be used as input.
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`

// Output: MistEO
Expand Down
4 changes: 2 additions & 2 deletions sample/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool parsing()
std::cerr << "Parsing failed" << std::endl;
return false;
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`
// Output: meojson
std::cout << value["repo"].as_string() << std::endl;
Expand Down Expand Up @@ -154,7 +154,7 @@ bool parsing_width()
std::cerr << "Parsing failed" << std::endl;
return false;
}
auto& value = ret.value(); // you can use rvalues if needed, like
json::value& value = ret.value(); // you can use rvalues if needed, like
// `auto value = std::move(ret).value();`
// Output: meojson
std::wcout << value[L"repo"].as_string() << std::endl;
Expand Down

0 comments on commit e9608f9

Please sign in to comment.