ObjFW  Diff

Differences From Artifact [ce29dc838b]:

To Artifact [0e6d0b7c8b]:


150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
	(double)2.5


6.) Extension Type

The extension type allows adding new objects to ObjFW serialization. The
extension type has a parameter class= which specifies the class which should

handle deserialization. The extension type starts with a [ and ends with a ].
Inside those brackets can be arbitray basic types, which should be passed 
unmodified to the class for deserialization.
If an implementation can't deserialize an extension type, it is required to
error out. Other languages are allowed to parse extension types of classes which
are in ObjFW, like OFXMLElement, but are by no means required to do so. Other
languages may also add their own extension types, but are required to add the
foreign= parameter and set it to their name, so other implementations don't try
to deserialize it, but error out instead. Other implementations are allowed to
serialize to ObjFW objects if they know them. For example, it might be desirable







>
|
|
|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	(double)2.5


6.) Extension Type

The extension type allows adding new objects to ObjFW serialization. The
extension type has a parameter class= which specifies the class which should
handle deserialization and a version= parameter which specifies the version of
the class serialization as a single integer. The extension type starts with a [
and ends with a ]. Inside those brackets can be arbitray basic types, which
should be passed unmodified to the class for deserialization.
If an implementation can't deserialize an extension type, it is required to
error out. Other languages are allowed to parse extension types of classes which
are in ObjFW, like OFXMLElement, but are by no means required to do so. Other
languages may also add their own extension types, but are required to add the
foreign= parameter and set it to their name, so other implementations don't try
to deserialize it, but error out instead. Other implementations are allowed to
serialize to ObjFW objects if they know them. For example, it might be desirable