Skip to content

Conversation

@dgoldie
Copy link

@dgoldie dgoldie commented Jul 2, 2021

No description provided.

@andyl
Copy link
Owner

andyl commented Jul 2, 2021

Doug, thanks for this!

Please submit a diff solution that will convert to/from JSON. The expression Diff.diff("asdf", "assdf") |> Jason.encode!() raises an error.

Also: if you can come up with a solution that does not require use of 3rd party dependency, that would be optimal. But in the near term, I would for sure prefer a dependency vs shelling out to the linux utils.

FYI I added a bit more context to Issue #2.

Thanks again for this PR!

@andyl
Copy link
Owner

andyl commented Jul 2, 2021

Just saw this on Elixir Forum - maybe a solution?

https://elixirforum.com/t/serialize-and-unserialize-structs-tuples-keyword-lists-atoms/40794

- using Hex diff and patch
- convert diff to map to pass through json
- 3 test cases
  - insert row
  - delete row
  - insert and delete row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants