Skip to content

Instantly share code, notes, and snippets.

@Loki-Astari
Last active September 5, 2019 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Loki-Astari/078a223c6a4a815d44527a46d408da03 to your computer and use it in GitHub Desktop.
Save Loki-Astari/078a223c6a4a815d44527a46d408da03 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <fstream>
#include "ThorSerialize/Traits.h"
#include "ThorSerialize/SerUtil.h"
#include "ThorSerialize/JsonThor.h"
struct Node
{
std::string tag;
std::string id;
std::vector<Node> children;
};
ThorsAnvil_MakeTrait(Node, tag, id, children);
int main()
{
using ThorsAnvil::Serialize::jsonImport;
std::ifstream file_stream("dom.txt");
Node json;
file_stream >> jsonImport(json);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment