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)
~ if (remaining_length_ < to_read)
~ to_read = remaining_length_;
+ adaptor_.socket().async_read_some(boost::asio::buffer(buffer_, static_cast<std::size_t>(to_read))
- size_t to_read = buffer_.size();
~ if (remaining_length_ < to_read)
~ to_read = remaining_length_;
- adaptor_.socket().async_read_some( boost::asio::buffer(buffer_, to_read)
~ Changed 'to_read' from [std::size_t] to [std::uint64_t],
hence when 'remaining_length_' [std::uint64_t] is assigned in 'to_read' no data is lossed.
When boost::asio::buffer is created 'to_read' is casted back to [std::size_t] explicitly truncating data.
It seems to be the correct behavior to choose fixed 'network side' types.
- buf[1] += size;
~ Warning was triggered by 'size' being std::size_t and lossing data by implicit casting to a narrower type.
This behavior seems correct, then we can explicit cast it.
HTTPMethod::Get and HTTPMethod::OPTIONS to HTTPMethod::Options.
VS2019 error:
enum "crow::HTTPMethod" has no member "HEAD"
enum "crow::HTTPMethod" has no member "GET"
enum "crow::HTTPMethod" has no member "OPTIONS"
See https://github.com/ipkn/crow/pull/307 for a similar issue.
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