Comments (5)
Please supply more or less runnable code.
Such constellation works:
public partial class BC_T1
{
public bool Head { get; set; }
}
public partial class BC_T2: BC_T1
{
public bool Hand { get; set; }
}
public partial class BC_T3
{
public List<BC_T2> bcccs { get; set; }
}
---------------------------------- now generate for each class with BiserObjectify encoders and use it like
// BiserObjectify.Generator.Run(typeof(BC_T3), true,
//@"------\VSProjects\tests", forBiserBinary: true, forBiserJson: false, null);
// BiserObjectify.Generator.Run(typeof(BC_T1), true,
//@"---\VSProjects\tests", forBiserBinary: true, forBiserJson: false, null);
BC_T3 mn1 = new BC_T3 { bcccs = new List<BC_T2>() };
mn1.bcccs.Add(new BC_T2 { Hand = true, Head = true });
var serializedObjectAsByteArray = mn1.BiserEncoder().Encode();
var retoredBinaryObject = BC_T2.BiserDecode(serializedObjectAsByteArray);
from biser.
In your example change your list to be of type List<BC_T1> and it will deserialize your BC_T2 as a BC_T1.
from biser.
Better if you create for me a sample project
from biser.
But, there is a non-desired behavior in deserializing, will check if it is possible to fix somehow:
from biser.
And this is hard to fix, because it will use decoder of BC_TC2 (that is richer) to deserialize BC_TC1.
Must be used like this
from biser.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biser.