question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exclude class discriminator

See original GitHub issue

Right now in Json { } we cannot disable write classDiscriminator. In source code i found that class discriminator can be ignored if we change writePolymorphic boolean inside encodePolymorphically in StreamingJsonEncoder. Can i somehow change it without fully fork your library and change all layers? Maybe somehow with extension

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sandwwraithcommented, May 19, 2021

What’s your use case for excluding the discriminator? You won’t be able to decode polymorphic data without it.

0reactions
sandwwraithcommented, May 26, 2021

I’ll close this because #1247 already mentions this use-case — feel free to continue the discussion there

Read more comments on GitHub >

github_iconTop Results From Across the Web

How are serializer discriminator groups used for exclusion ...
1 Answer 1 · Thanks Thomas. I understand how a group can be added to a property. · discriminator is a property, like...
Read more >
Is It Illegal For My Boss To Exclude Me From Work Events?
You can prove discrimination if you have evidence that your career suffered due to exclusion based on your membership in a protected class,...
Read more >
Annotations - serializer Documentation (master)
@Exclude¶. This annotation can be defined on a property or a class to indicate that the property or class should not be serialized/unserialized....
Read more >
Title IX and Sex Discrimination - Department of Education
Title IX protects people from discrimination based on sex in education programs ... on the basis of sex, be excluded from participation in, ......
Read more >
Inheritance and Polymorphism - Swagger
In our example, the discriminator points to the objectType property that contains the data type name. The discriminator is used with anyOf or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found