Closed 6d7a closed 7 months ago
Thank you for your PR!
I have two initial bits of feedback, the first is that I don't think this should be a feature. If we want to go for that approach we should do that separately and apply it uniformly to the other codecs.
The second is the use of serde. Since we don't benefit from the generic codec framework of serde, since we are a codec framework ourselves, wouldn't we be better off using a purpose built json library, like jzon?
jzon
looks indeed promising, I overlooked it designing the JER implementation. The API is similar to serde_json
so it won't take much effort ro refactor. Seeing that jzon
doesn't have any further dependencies I don't see any harm in not making JER a feature. I'll follow up with an update.
@XAMPPRocky I replaced serde_json
with jzon
and moved the jer
feature into the main codebase. I also made a small change to Codec
in order to handle text-based encoding rules. Unfortunately, some fuzz tests fail under specific builds and I'm having a hard time figuring out why. Do you have an idea? Thanks!
Thank you for your PR!
Adds support for JSON encoding rules
JER-support is implemented as a non-default feature, both in
rasn
as the featurejer
, as well as inrasn-derive
as the featuretext-based-encodings
(changes inrasn-derive
will likely be needed for XER handling, too). Encoder and decoder are built uponserde_json
.Closes #188
109