robshakir / pyangbind

A plugin for pyang that creates Python bindings for a YANG model.
Other
203 stars 121 forks source link

Fix decoding xml blob with key that must follow a pattern #346

Closed JoseIgnacioTamayo closed 5 months ago

JoseIgnacioTamayo commented 6 months ago

A fix for https://github.com/robshakir/pyangbind/issues/345

When decoding an XML blob, pyanbind was trying to check the pattern restriction on an lxml.objectify.StringElement object, which is not a native string type.

With JSON decoding, this problem does not happen because the JSON value is a native str type.