#53 Should encode/decode fields available in superclasses

open
nobody
None
5
2010-02-20
2010-02-20
R. Lemos
No

Example:

class SuperClass {
public int fieldInSuperClass;
public SuperClass() {}
}

class SubClass extends SuperClass {
public int fieldInSubClass;
public SubClass() {}
}

SubClass x = new SubClass();
x.fieldInSubClass = 1;
x.fieldInSuperClass = 2;
Yaml.dump(x, System.out);

---------- This code prints the following lines ----------
--- !SubClass
fieldInSubClass: 1
--------------------------------------------------------------------------------

Clearly the field in superclass is missing. Is this by design?

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks