0

I have a python code that sends objects to java code.

my python object is a dataclass like this:

@dataclass
class MyObject:
    name: str
    lastName: str

and I recoded this same object in java.

But I would like the attributes of these python and java objects to be identical, to be tested as when you test the structure of an xml file with an xsd file.

I would like an xsd file for example that will test the attributes of my python and java objects. and check that there is a name and lastname and that they are string type.

in advance thank you

  • 1
    Possible duplicate of [Validating detailed types in python dataclasses](https://stackoverflow.com/questions/50563546/validating-detailed-types-in-python-dataclasses) – Arne Aug 22 '19 at 07:42
  • As long as you only use builtin types in your object (`int`, `float`, `string`, ...), the version in the question of the linked dupe might already be sufficient for your purposes. – Arne Aug 22 '19 at 07:46

0 Answers0