Skip to content

Any type json marshaling. #170

Closed
Closed
@AmandaCameron

Description

@AmandaCameron

It'd be nice if the Any type could be marshaled properly by jsonpb, as currently it ends up marshaling as a couple of strings, one of which being the base64-encoded value of the type.

I recognise this might not be an easy-to-do thing (I had forked to try and get it going, but couldn't find an obvious place for it. ) however it is still wanted, so at the very least this can be a tracking bug or similar.

Activity

dsymonds

dsymonds commented on Apr 17, 2016

@dsymonds
Contributor

It's just something we haven't gotten to yet. The text format supports Any messages; jsonpb just needs to be updated.

AmandaCameron

AmandaCameron commented on Apr 19, 2016

@AmandaCameron
Author

If you can give me some hints as to where I should be hooking in, I'd be glad to try and tackle this problem, as it's something of great interest to me.

ATM, I'm mildly confused as to wether I should be poking at marshalValue or marshalObject, as neither seem particularly well-suited for types that are actually objects, instead of primitives, at least in the WKT corner.

Or am I to assume that this isn't exactly trivial in the current code layout, and that's why it's not been gotten to yet.

self-assigned this
on Apr 19, 2016
dsymonds

dsymonds commented on Apr 19, 2016

@dsymonds
Contributor

I'll see if I can get it done today.

dsymonds

dsymonds commented on Apr 20, 2016

@dsymonds
Contributor

I should have marshaling done later today. It was a bit trickier than the other well-known types.

Unmarshaling is going to be harder again; that'll be a TODO for now. Is that going to be something important for you?

AmandaCameron

AmandaCameron commented on Apr 20, 2016

@AmandaCameron
Author

Marshaling only will be fine for now. However has there been a tracking bug for me to follow for possible updates in the future?

dsymonds

dsymonds commented on Apr 20, 2016

@dsymonds
Contributor

There isn't, but feel free to open one.

locked and limited conversation to collaborators on Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @dsymonds@AmandaCameron

      Issue actions

        Any type json marshaling. · Issue #170 · golang/protobuf