I've spent the last week or so tinkering with my C++11 JSON experiment, and now actually seems to be functional.
There's a lot of work yet to do! But it has basic functionality now, so I've decided to open the thing up for public consumption. I've released it under the MIT license, and made the source code available on Bitbucket.
This is the library that I wished I had time to write for the last couple years. My previous job included a lot of work using JSON-RPC to communicate between web applications and C++ applications. We used cJSON extensively, but it's C interface just doesn't look right in C++ code.
This library tries to take advantage of the new C++11-isms, move constructors, lambdas, uniform initialization, etc.
It's is still in the very experimental stage, it's interface is likely going to change, and has a few bugs. Check it out if you like.
Sunday, March 9, 2014
Tuesday, March 4, 2014
The experiment: a C++11 JSON library
Introducing the json experiment, a new library that I'm building to create, manipulate, and parse JSON in C++11.
For example, objects can be created by using an initializer_list:
If that's not cool enough, how about using an initializer list with a vector of objects?
More to come.
For example, objects can be created by using an initializer_list:
jsonex::object json{
{"A", {{"A1", 1}, {"A2", 2} }},
{"B", {{"B1", 1}, {"B2", 2} }},
{"C", {{"C1", {{"C11", 11}, {"C12", 12} }}, {"C2", 2} }},
};
If that's not cool enough, how about using an initializer list with a vector of objects?
std::vector json_vector{1, 2, 3, "A", false, nullptr};
I'm about 3 days into this project, but the code above is taken directly from some of the unit tests, so I'm a bit encouraged that this may turn out to be something useful. I hope to get it up on bitbucket pretty soon.More to come.
Friday, February 28, 2014
Enable Network Scanning on a Mac
If you happen to have a Mac with a recent copy of OS X, and also happen to have a network scanner (such as the Lexmark S515), this post is for you.
After I bought the above printer, I somehow managed to enable network scanning to my computer. It's great, you walk up to the scanner, throw some paper into the document feeder, press the scan button, and PDFs show up on your computer. I use this feature almost daily.
However, a couple of days ago I started setting up a new Mac, and realized that I had no clue how to do this. I spent about a day searching on the internet, looking for old driver CDs, downloading stuff, and pulling my hair out.
It turns out, all you have to do is click the "Allow scanning to this Mac" checkbox.
Hopefully this post will help someone else there keep their hair.
Subscribe to:
Comments (Atom)
