paylogic/halogen — pull request #2 by mattupstate (2014-12-15 00:41:13+00:00)
Title: Update schema.py

This will allow for the underlying dictionary implementation to be configurable without changing the current/default behavior. For example:

```python
from collections import OrderedDict

from halogen import Schema, Link, Attr, Embedded

class MySchema(Schema):
dict_type = OrderedDict

OrderedSchema = type('MyOrderedSchema', (BaseSchema,), OrderedDict([
('self', Link()),
('field', Attr()),
('sub', Embedded())
]))

OrderedSchema.serializer(obj)
```

This would allow someone to have predictable serialization results:

```json
{
"_links": { ... },
"field": "value",
"_embedded": { ... }
}
```