You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
233 B

  1. #include <json.hpp>
  2. using json = nlohmann::json;
  3. int main()
  4. {
  5. // an anonymous enum
  6. enum { t = 17 };
  7. // create a JSON number from the enum
  8. json j(t);
  9. // serialize the JSON numbers
  10. std::cout << j << '\n';
  11. }