Change NodeToString.cpp to output JSON not html #1563

Closed
joevilches wants to merge 3 commits from export-D52929268 into main
joevilches commented 2024-01-24 11:47:13 -08:00 (Migrated from github.com)

Summary: We want to be able to capture Yoga trees in production. To do this we need to serialize and deserialize the in-memory representation of a tree. We have a way to turn a tree into html using NodeToString.cpp but that outputs html, which is going to be hard to deserialize. So, I added the nlohmann json library so that we can serialize into JSON instead. Then we need to change the inner workings of NodeToString.cpp to use this library instead of its html.

Differential Revision: D52929268

Summary: We want to be able to capture Yoga trees in production. To do this we need to serialize and deserialize the in-memory representation of a tree. We have a way to turn a tree into html using NodeToString.cpp but that outputs html, which is going to be hard to deserialize. So, I added the [nlohmann json library](https://github.com/nlohmann/json/tree/develop?tab=readme-ov-file) so that we can serialize into JSON instead. Then we need to change the inner workings of NodeToString.cpp to use this library instead of its html. Differential Revision: D52929268
vercel[bot] commented 2024-01-24 11:47:19 -08:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yoga-website-next Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 7:09pm
[vc]: #BmighcoRwOjbfT75IIGGZeckMWCg3Mvbu4DTfas0jl8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ5b2dhLXdlYnNpdGUtbmV4dCIsInJvb3REaXJlY3RvcnkiOiJ3ZWJzaXRlLW5leHQiLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vZmJvcGVuc291cmNlL3lvZ2Etd2Vic2l0ZS1uZXh0L0pBMjZBZk1RbmdWN3M2NkxueVpwem9oSll5bTgiLCJwcmV2aWV3VXJsIjoieW9nYS13ZWJzaXRlLW5leHQtZ2l0LWZvcmstam9ldmlsY2hlcy1leHBvci1jOWU3NDctZmJvcGVuc291cmNlLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoieW9nYS13ZWJzaXRlLW5leHQtZ2l0LWZvcmstam9ldmlsY2hlcy1leHBvci1jOWU3NDctZmJvcGVuc291cmNlLnZlcmNlbC5hcHAifX1dfQ== **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yoga-website-next** | ✅ Ready ([Inspect](https://vercel.com/fbopensource/yoga-website-next/JA26AfMQngV7s66LnyZpzohJYym8)) | [Visit Preview](https://vercel.live/open-feedback/yoga-website-next-git-fork-joevilches-expor-c9e747-fbopensource.vercel.app?via=pr-comment-visit-preview-link&passThrough=1) | 💬 [**Add feedback**](https://vercel.live/open-feedback/yoga-website-next-git-fork-joevilches-expor-c9e747-fbopensource.vercel.app?via=pr-comment-feedback-link) | Feb 2, 2024 7:09pm |
facebook-github-bot commented 2024-01-24 11:47:21 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D52929268

This pull request was **exported** from Phabricator. Differential Revision: [D52929268](https://www.internalfb.com/diff/D52929268)
facebook-github-bot commented 2024-02-01 16:22:38 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D52929268

This pull request was **exported** from Phabricator. Differential Revision: [D52929268](https://www.internalfb.com/diff/D52929268)
facebook-github-bot commented 2024-02-01 16:35:27 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D52929268

This pull request was **exported** from Phabricator. Differential Revision: [D52929268](https://www.internalfb.com/diff/D52929268)
facebook-github-bot commented 2024-02-01 16:39:29 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D52929268

This pull request was **exported** from Phabricator. Differential Revision: [D52929268](https://www.internalfb.com/diff/D52929268)
facebook-github-bot commented 2024-02-02 11:06:30 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D52929268

This pull request was **exported** from Phabricator. Differential Revision: [D52929268](https://www.internalfb.com/diff/D52929268)
facebook-github-bot commented 2024-02-02 15:50:25 -08:00 (Migrated from github.com)

This pull request has been merged in facebook/yoga@bb83f45872.

This pull request has been merged in facebook/yoga@bb83f458729eb0633c4ecd28673e8e9a6eeb79d1.

Pull request closed

Sign in to join this conversation.
No description provided.