Jeroen De Dauw has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73781


Change subject: Added documentation on serialization code usage
......................................................................

Added documentation on serialization code usage

Change-Id: Ib7ce7b0bec28172051ab3212f62cc7b1e6f0bfcd
---
M README.md
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/81/73781/1

diff --git a/README.md b/README.md
index 58f421f..47beb19 100644
--- a/README.md
+++ b/README.md
@@ -183,6 +183,22 @@
 );
 ```
 
+### Serialization and deserialization
+
+The Ask language objects can all be serialized to a generic format from which 
the objects can later
+be reconstructed. This is done via a set of Serializers/Serializer 
implementing objects. These
+objects turn for instance a Query object into a data structure containing only 
primitive types and
+arrays. This data structure can thus be readily fed to json_enoce, serialize, 
or the like. The
+process of reconstructing the objects from such a serialization is provided by 
objects implementing
+the Deserializers/Deserializer interface.
+
+Serializers can be obtained via an instance of SerializerFactory and 
deserializers can be obtained
+via an instance of DeserializerFactory. You are not allowed to construct these 
serializers and
+deserializers directly yourself or to have any kind of knowledge of them (ie 
type hinting). These
+objects are internal to the Ask library and might change name or structure at 
any time. All you
+are allowed to know when calling $serializerFactory->newQuerySerializer() is 
that you get back
+an instance of Serializers\Serializer.
+
 ## Tests
 
 This library comes with a set up PHPUnit tests that cover all non-trivial 
code. You can run these

-- 
To view, visit https://gerrit.wikimedia.org/r/73781
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7ce7b0bec28172051ab3212f62cc7b1e6f0bfcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to