Open amnaredo opened 2 years ago
Wouldn't it make sense to pickle class hierarchies containing Js.Value as the json it represents?
Example:
import upickle.default._ import upickle.Js case class A(x:Int, json:Js.Value) write(A(5, Js.Str("hello"))) // returns: {"x":5,"json":{"$type":"upickle.Js.Str","value":"hello"}} // expected: {"x":5,"json":"hello"}
Should be trivial, as we already have upickle.json.write and read.
upickle.json.write
read
Is this PR supposed to do that? https://github.com/lihaoyi/upickle-pprint/pull/114
If you give me a hint where to start, I'll try to implement it and send a PR.
ID: 170 Original Author: fdietze
Original Author: lihaoyi
Wouldn't it make sense to pickle class hierarchies containing Js.Value as the json it represents?
Example:
Should be trivial, as we already have
upickle.json.write
andread
.Is this PR supposed to do that? https://github.com/lihaoyi/upickle-pprint/pull/114
If you give me a hint where to start, I'll try to implement it and send a PR.
ID: 170 Original Author: fdietze