Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 6167e51

Browse files
committed
mdformat README.md
1 parent 78420e4 commit 6167e51

File tree

1 file changed

+55
-30
lines changed

1 file changed

+55
-30
lines changed

README.md

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,79 @@
22

33
## Introduction
44

5-
Built JSON provides serialization for the
6-
[Libraries for Object Oriented Dart](https://github.com/google/built_value.dart/blob/master/libraries_for_object_oriented_dart.md#libraries-for-object-oriented-dart).
5+
Built JSON provides serialization for the [Libraries for Object Oriented Dart]
6+
(https://github.com/google/built_value.dart/blob/master/libraries_for_object_oriented_dart.md#libraries-for-object-oriented-dart).
77

88
This allows a complete serializable object oriented data model to be based on
99
[Enum Classes](https://github.com/google/enum_class.dart#enum-classes-for-dart),
10-
[Built Collections](https://github.com/google/built_collection.dart#built-collections-for-dart)
11-
and
12-
[Built Values](https://github.com/google/built_value.dart#built-values-for-dart).
10+
[Built Collections]
11+
(https://github.com/google/built_collection.dart#built-collections-for-dart) and
12+
[Built Values]
13+
(https://github.com/google/built_value.dart#built-values-for-dart).
1314

1415
Built JSON for Java, a separate project, will provide compatible serialization
1516
for Java, mapping Enum Classes to standard Java enums, Built Collections to
16-
[Immutable Collections](https://github.com/google/guava/wiki/ImmutableCollectionsExplained)
17-
and Built Values to [AutoValues](https://github.com/google/auto/tree/master/value#autovalue).
17+
[Immutable Collections]
18+
(https://github.com/google/guava/wiki/ImmutableCollectionsExplained) and Built
19+
Values to [AutoValues]
20+
(https://github.com/google/auto/tree/master/value#autovalue).
1821

1922
## Status
2023

2124
Built JSON is not yet ready for use. Watch this space!
2225

23-
2426
## Motivation
2527

2628
There are many ways to serialize data. Why do we need another?
2729

28-
Built JSON is about serialization of object oriented data. There are many ways to do this, too. Built JSON is different to other libraries for a number of reasons:
29-
30-
Built JSON _fully supports object oriented design_: any object model that you can design can be serialized, including full use of generics and interfaces. Some other libraries require concrete types or do not fully support generics.
31-
32-
Built JSON _allows different object oriented models over the same data_. For example, in a client server application, it's likely that the client and server want different functionality from their data model. So, they are allowed to have different classes that map to the same data. Most other libraries enforce a 1:1 mapping between classes and types on the wire.
33-
34-
Built JSON _requires well behaved types_. They must be immutable, can use interface but not concrete inheritance, must have predictable nullability, `hashCode`, `equals` and `toString`. In fact, they must be Enum Classes, Built Collections or Built Values. Some other libraries allow badly behaved types to be serialized.
35-
36-
Built JSON _supports changes to the data model_. Optional fields can be added or removed, and fields can be switched from optional to required, allowing your data model to evolve without breaking compatbility. Some other libraries break compatability on any change to any serializable class.
37-
38-
Built JSON _is modular_. Each endpoint can choose which classes to know about; for example, you can have multiple clients that each know about only a subset of the classes the server knows. Most other libraries are monolithic, requiring all endpoints to know all types.
39-
40-
Built JSON _is multi language_. Support will be come first for Dart, Java and Java/GWT. Many other libraries support a single language only.
41-
42-
Built JSON _has first class support for validation_ via Built Values. An important part of a powerful data model is ensuring it's valid, so classes can make guarantees about what they can do. Other libraries also support validation but usually in a less prominent way.
43-
44-
And, finally, Built JSON _is pluggable_. Arbitrary extensions can be added to give custom JSON serialization for your own types. This could be used to interoperate with other tools or to add hand coded high performance serializers for specific classes. Some other libraries are not so extensible.
45-
30+
Built JSON is about serialization of object oriented data. There are many ways
31+
to do this, too. Built JSON is different to other libraries for a number of
32+
reasons:
33+
34+
Built JSON _fully supports object oriented design_: any object model that you
35+
can design can be serialized, including full use of generics and interfaces.
36+
Some other libraries require concrete types or do not fully support generics.
37+
38+
Built JSON _allows different object oriented models over the same data_. For
39+
example, in a client server application, it's likely that the client and server
40+
want different functionality from their data model. So, they are allowed to have
41+
different classes that map to the same data. Most other libraries enforce a 1:1
42+
mapping between classes and types on the wire.
43+
44+
Built JSON _requires well behaved types_. They must be immutable, can use
45+
interface but not concrete inheritance, must have predictable nullability,
46+
`hashCode`, `equals` and `toString`. In fact, they must be Enum Classes, Built
47+
Collections or Built Values. Some other libraries allow badly behaved types to
48+
be serialized.
49+
50+
Built JSON _supports changes to the data model_. Optional fields can be added or
51+
removed, and fields can be switched from optional to required, allowing your
52+
data model to evolve without breaking compatbility. Some other libraries break
53+
compatability on any change to any serializable class.
54+
55+
Built JSON _is modular_. Each endpoint can choose which classes to know about;
56+
for example, you can have multiple clients that each know about only a subset of
57+
the classes the server knows. Most other libraries are monolithic, requiring all
58+
endpoints to know all types.
59+
60+
Built JSON _is multi language_. Support will be come first for Dart, Java and
61+
Java/GWT. Many other libraries support a single language only.
62+
63+
Built JSON _has first class support for validation_ via Built Values. An
64+
important part of a powerful data model is ensuring it's valid, so classes can
65+
make guarantees about what they can do. Other libraries also support validation
66+
but usually in a less prominent way.
67+
68+
And, finally, Built JSON _is pluggable_. Arbitrary extensions can be added to
69+
give custom JSON serialization for your own types. This could be used to
70+
interoperate with other tools or to add hand coded high performance serializers
71+
for specific classes. Some other libraries are not so extensible.
4672

4773
## Examples
4874

49-
See
50-
[this example](https://github.com/google/built_json.dart/tree/master/example)
51-
for a full project with a `build.dart` and some examples.
52-
75+
See [this example]
76+
(https://github.com/google/built_json.dart/tree/master/example) for a full
77+
project with a `build.dart` and some examples.
5378

5479
## Features and bugs
5580

0 commit comments

Comments
 (0)