Skip to content

Commit

Permalink
Add json_to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
0x24a committed Aug 27, 2023
1 parent 1533dec commit 8bf200b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sblang_builtin_funcs/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ using json = nlohmann::json;
using namespace std;
string get_json_value(string json_text,string key){
return json::parse(json_text)[key].get<std::string>();
}
string json_to_string(json object){
return object.dump()
}

0 comments on commit 8bf200b

Please sign in to comment.