Skip to content

Conversation

tomusdrw
Copy link
Contributor

@tomusdrw tomusdrw commented Jul 9, 2019

Some types in Response were missing deny_unknown_fields that would cause invalid response to be parsed correctly when Deserializing.

However later I started thinking if having a less strict version would be useful as well, hence I introduced the strict feature.

I'd like to hear your opinions on whether we want to maintain strict and non-strict versions or rather default to strict.

See: tomusdrw/rust-web3#222 (comment) why non strict mode would be useful.

@tomusdrw tomusdrw requested review from ascjones and debris July 9, 2019 15:36
@tomusdrw tomusdrw changed the title Strict and non-strict mode. Strict and non-strict parsing for core Jul 9, 2019
Copy link
Contributor

@debris debris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like strict more... jsonrpc provides a way to send arbitrary data in a params field, so I don't see a reason why someone would need to use other fields

@tomusdrw
Copy link
Contributor Author

@debris Yeah, I'm more inclined to go with strict-only, but wanted a second confirmation. Note that this will break compatibility with servers/clients that add some stuff to the response/request objects (one example of this is linked in the description).

Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Agree about strict

@tomusdrw tomusdrw merged commit 091577f into master Jul 11, 2019
@tomusdrw tomusdrw deleted the td-reject branch July 11, 2019 09:55
@tomusdrw tomusdrw changed the title Strict and non-strict parsing for core Strict parsing for core Jul 11, 2019
@jez
Copy link

jez commented Oct 25, 2020

I opened a follow up issue here:

#595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants