Search

July 04, 2022
Learn »
D offers `SumType` struct to manage tagged Union types.

But there is no support for...
June 23, 2022
Learn »
...slightly different -- you don't need to serialize anything. The parser provides mechanisms to jump...
June 21, 2022
Learn »
...schveiguy/jsoniopipe/blob/4fa5350ed97786e34612a755f7e857544c6f9512/source/iopipe/json/serialize.d#L50-L55

Or, you can provide...
May 12, 2022
Learn »
...code, I would do something like:

	auto serialize(T)(T data) {
		static if (is(T...
May 03, 2022
Learn »
...classes, because you need to declare the serialize methods in the base class without `override...
May 03, 2022
Learn »
...nutshell, what Serializable does is to inject serialize() and deserialize() methods into the class hierarchy...
May 03, 2022
Learn »
...Child();
        // if we called this in the serialize function or even one of those constructors...
March 22, 2022
Learn »
...Base, C), C)) {
			override void serialize(...) {
				serializeImpl();
			}
		} else {
			void serialize(...) {
				serializeImpl();
			}
		}
		private void serializeImpl(...) {
			auto...
March 22, 2022
Learn »
...main() {
	writeln(serialize(new Person)); // name,age
	writeln(serialize(new Boss)); // numEmployees
	writeln(serialize(cast...
March 14, 2022
General »
but this fails:
```d
class Base {
    string serialize(this This)() {
        string _stringof = This.stringof;
        return...
1 2 3 4 5
Next ›   Last »