Vladislav Oleshko
c105a86a7a
Fix struct/class divergence
2022-07-22 00:45:40 +03:00
Vladislav Oleshko
ea4c672a41
Emulate variant with json wvalue for C++11/14
2022-06-22 17:02:16 +03:00
Farook Al-Sammarraie
454dabdba2
formatting
2022-06-21 02:56:07 +03:00
The-EDev
ab2a132bff
fixed error in json float dump (where a pointer was checked against nullptr instead of '\0')
2022-06-21 02:25:42 +03:00
The-EDev
c2d1bfac38
Fix wvalue::Operator = (wvalue && r);
2022-06-20 05:52:30 +03:00
Luca Schlecker
e7a04859fe
r_string: combine equality operation algorithm.
...
A private templated function containing the algorithm is used to prevent repetition.
2022-06-18 17:21:37 +03:00
Luca Schlecker
9cffc3f268
json: add missing r_string comparison operator.
2022-06-18 17:21:37 +03:00
Luca Schlecker
4aa9b3e89b
json: replace std::equal to maintain C++11 compatibility.
2022-06-18 17:21:37 +03:00
Luca Schlecker
5336d0fff7
json: replace remaining boost functions with their std equivalent.
2022-06-18 17:21:37 +03:00
Luca Schlecker
df92d6d639
replace boost::lexical_cast with an equivalent based on std::stringstream.
2022-06-18 17:21:37 +03:00
Luca Schlecker
f3d00bbecf
replace boost::asio with standalone asio.
2022-06-18 17:21:37 +03:00
Luca Schlecker
78f764791e
remove 'using namespace boost' declarations.
2022-06-18 17:21:37 +03:00
The-EDev
5f18548369
Fixed problem where GCC < 6 wouldn't compile Crow
2022-03-30 15:50:11 +03:00
The-EDev
9a7677bf1a
Applied changes from review
...
Also moved builtin_expect to utility.h (for use in sanitizer function)
2022-02-11 00:56:30 +03:00
Farook Al-Sammarraie
ab50fb3134
Merge branch 'master' into parser_optimization
2022-02-11 00:46:19 +03:00
Vhuynh25
07a2422c63
changed output to null and changed warning message
...
also changed from <cmath> to <math.h>
2022-02-08 15:45:49 -08:00
Vhuynh25
c44fec82bf
added space to match clang format
2022-02-06 11:58:41 -08:00
The-EDev
175b004c26
code formatting (also disabled formatting where not applicable)
2022-02-06 22:29:46 +03:00
The-EDev
75b100527f
Merge branch 'refs/heads/master' into parser_optimization
2022-02-05 18:35:01 +03:00
The-EDev
4cdde73388
Optimized HTTP parser
...
Also (likely) fixed problem with streaming without keeping connection
alive
Also fixed problem with multipart hanging on request
Also updated TODO entries to indicate Writer
2022-02-05 18:15:19 +03:00
Vhuynh25
781a40bee1
fixed clang format
2022-02-03 09:07:54 -08:00
Vien Huynh
c21ae7ea3e
change NaN output warning message
2022-02-01 16:40:07 -05:00
Vien Huynh
a134e2b9ff
fixed NaN handling errors
2022-02-01 15:31:09 -05:00
Vien Huynh
9af906dc21
fixed JSON outputting NaN and infinite values
2022-01-30 23:43:30 -05:00
Thomas Neumann
3569c93984
defend against excessive recursion in json::load
...
Passing a deeply nested JSON structure to json::load leads to a crash
due to stack overflow. We handle this now gracefully by limiting the
maximum nesting depth to 10,000.
Test case:
https://github.com/nst/JSONTestSuite/blob/master/test_parsing/n_structure_100000_opening_arrays.json
2022-01-25 08:48:36 +01:00
Farook Al-Sammarraie
790e34cea8
Merge branch 'master' into mustache_lambdas
2021-12-17 09:08:24 +03:00
Mosolov Sergey
d59cda5677
Fixes issue 302
...
https://github.com/CrowCpp/Crow/issues/302
Escape only the invisible characters from 0 to 31 inclusive
Motivation: do not escape UTF8 encoding bytes
2021-12-17 08:47:00 +04:00
The-EDev
f6fd7dc85d
formatting, missing newline fixed
2021-12-11 02:38:30 +03:00
The-EDev
a1a4169d92
merge branch master
2021-12-10 05:12:24 +03:00
The-EDev
94a2f942bc
changed comment style back to the original (doxygen did not work with the new style)
2021-12-03 06:39:23 +03:00
The-EDev
03e59aa446
improved bracing rules, commented out clang-format 14 rule
2021-11-27 15:28:50 +03:00
The-EDev
7f4b7c8ff9
created new rules, used bot to enforce rules in PRs
2021-11-25 14:45:38 +03:00
Farook
eefe8f62bf
made it so that workarounds would only run if the user is on an apple machine
2021-10-22 14:27:10 +03:00
The-EDev
efd55597f0
changed json and app code (relating to blueprints and initializer list)
...
also snuck in some guide updates
2021-10-10 14:42:36 +03:00
The-EDev
f5338260bb
several changes:
...
added json list in a similar fashion to json object
renamed object_type to object
updated readme, index.html, and json.md to include objects and lists
updated examples to be slightly cleaner and include lists
replaced instances of json object (std::map and such) with the short version (object)
accurate floating point number dumping (`6.0` instead of `6`) while taking 1/30th of the time (29 microseconds saved)
added json list testing
snuck in utf-8 middleware warning fix
snuck in twitter card style for crowcpp.org site (makes social media cards look way better with a large image)
2021-08-20 03:57:21 +03:00
Lucas David
1e52b0182d
~ Corrected code as mentionned in review comments.
2021-08-11 22:25:58 +02:00
Lucas David
8f10f92627
Merge branch 'master' into feature-#189
2021-08-11 21:57:54 +02:00
Lucas David
df41cbec49
~ Replaced foreach character type unsigned char
by auto
to resolve issue #195 .
2021-08-11 15:43:40 +02:00
Lucas David
235f2b9ef4
+ Added (implicit) constructors for json "supported" types.
...
+ added corresponding tests.
+ Added json-map examples.
2021-08-09 14:32:51 +02:00
Lucas David
762af68306
+ Added object constructor and assignment for json::wvalue and unit tests.
...
+ json::wvalue::wvalue(std::initializer_list<std::pair<std::string const, json::wvalue>>
+ json::wvalue::wvalue(std::[unordered_]map<std::string, json::wvalue> const&)
+ json::wvalue::wvalue(std::[unordered_]map<std::string, json::wvalue>&&)
+ json::wvalue::operator=(std::initializer_list<std::pair<std::string const, json::wvalue>>)
+ json::wvalue::operator=(std::[unordered_]map<std::string, json::wvalue> const&)
+ json::wvalue::operator=(std::[unordered_]map<std::string, json::wvalue>&&)
2021-08-09 14:32:51 +02:00
The-EDev
6df5c94fd9
basic lambda support added (no expansion / blocks)
2021-07-03 23:28:52 +03:00
Maxime BELUGUET
811ef62c6f
Fix constness on json dump method #133
2021-05-18 18:10:39 +02:00
The-EDev
0e9b615c2b
fixed typos
2021-05-13 13:30:48 +03:00
The-EDev
f39b9ddce7
Quality of life improvements
...
Added pop() method to query_string, same as get(), but removes the item from the querystring
Added std::string() operator to json::rvalue (allows std::string(json["abc"]), which returns any value that isn't a container to string)
Added lo() method to json::rvalue, returns a vector of json::rvalue containing whatever a json object or list has (difference being a list has no keys)
Added keys() method to json::rvalue, returns a vector of std::string containing the keys of a json object
Made json::wvalue use either std::map or std::unordered_map instead of just std::unordered_map
Added copy constructor to json::wvalue
Added size() method to json::wvalue, returns 1 or the size of the json list.
Added constructor to create json::wvalue from std::vector
Added keys() method to query_string
Documented query_string and improved json doc
Made tests and examples for all the additions
2021-05-12 15:45:55 +03:00
Sfinktah Bungholio
6597feb3a8
converted all (int) to static_cast
2021-02-21 11:14:30 +11:00
The-EDev
33f1206571
made json a returnable type and removed json specific code
2021-01-05 17:49:10 +03:00
The-EDev
ed2a7ae0e0
Added returnables class and applied to multipart
...
did not apply to JSON because it caused a linker error
also changed the version of boost required in CMAKE
2020-12-18 12:28:37 +03:00
The-EDev
2422f55855
documented as much as possible relating to the API reference
2020-11-19 01:13:57 +03:00
The-EDev
cdd613935d
removed char <=0 comparison
...
(not sure why it invoked an error in ARM now)
2020-10-20 12:17:00 +03:00
ipknHama
05d02fea6e
Remove printf warning for lld, llu
2017-12-25 16:26:30 +09:00