Skip to content

Commit a2fe336

Browse files
committed
Updated documentation files to split out each sentence on a newline.
1 parent d6a1e09 commit a2fe336

File tree

3 files changed

+86
-32
lines changed

3 files changed

+86
-32
lines changed

CONTRIBUTING.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# How to contribute
22

3-
There are a few guidelines that we need contributors to follow so that we are able to process requests as efficiently as possible. If you have any questions or concerns please feel free to contact us at [[email protected]](mailto:[email protected]).
3+
There are a few guidelines that we need contributors to follow so that we are able to process requests as efficiently as possible.
4+
If you have any questions or concerns please feel free to contact us at [[email protected]](mailto:[email protected]).
45

56
## Getting Started
67

@@ -24,7 +25,8 @@ There are a few guidelines that we need contributors to follow so that we are ab
2425

2526
* Push your changes to a topic branch in your fork of the repository.
2627
* Submit a pull request to the repository in the Nike-Inc organization.
27-
* After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request if it isn't showing any activity.
28+
* After feedback has been given we expect responses within two weeks.
29+
After two weeks we may close the pull request if it isn't showing any activity.
2830
* Bug fixes or features that lack appropriate tests may not be considered for merge.
2931
* Changes that lower test coverage may not be considered for merge.
3032

Documentation/Elevate 2.0 Migration Guide.md

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Elevate 2.0 Migration Guide
22

3-
Elevate 2.0 is the latest major release of Elevate, a JSON parsing framework that leverages Swift to make parsing simple, reliable and composable for iOS, macOS, tvOS and watchOS. As a major release, following Semantic Versioning conventions, 2.0 introduces several API-breaking changes that one should be aware of.
3+
Elevate 2.0 is the latest major release of Elevate, a JSON parsing framework that leverages Swift to make parsing simple, reliable and composable for iOS, macOS, tvOS and watchOS.
4+
As a major release, following Semantic Versioning conventions, 2.0 introduces several API-breaking changes that one should be aware of.
45

56
This guide is provided in order to ease the transition of existing applications using Elevate 1.x to the latest APIs, as well as explain the design and structure of new and changed functionality.
67

@@ -10,9 +11,13 @@ Elevate 2.0 officially supports iOS 8.0+, macOS 10.10+, tvOS 9.0+, watchOS 2.0+,
1011

1112
## Reasons for Bumping to 2.0
1213

13-
In general, we try to avoid MAJOR version bumps unless absolutely necessary. We realize the difficulty of transitioning between MAJOR version API changes. Elevate 2.0 was unavoidable due to the drastic API changes introduced by Apple in Swift 3. There was no possible way to adhere to the new Swift [API Design Guidelines](https://swift.org/documentation/api-design-guidelines/) and not bump the MAJOR version.
14+
In general, we try to avoid MAJOR version bumps unless absolutely necessary.
15+
We realize the difficulty of transitioning between MAJOR version API changes.
16+
Elevate 2.0 was unavoidable due to the drastic API changes introduced by Apple in Swift 3.
17+
There was no possible way to adhere to the new Swift [API Design Guidelines](https://swift.org/documentation/api-design-guidelines/) and not bump the MAJOR version.
1418

15-
Since we knew we had to cut a MAJOR release to support Swift 3, we decided to package up a few API changes as well while we were at it. These changes are covered in detail in the [Breaking API Changes](#breaking-api-changes) section below.
19+
Since we knew we had to cut a MAJOR release to support Swift 3, we decided to package up a few API changes as well while we were at it.
20+
These changes are covered in detail in the [Breaking API Changes](#breaking-api-changes) section below.
1621

1722
The changes to the Elevate API were primarily naming changes and the majority of them can be made through a global Find and Replace operation.
1823

@@ -29,13 +34,15 @@ While these benefits are nice, the core motivation for updating to Elevate 2.0 s
2934

3035
## Breaking API Changes
3136

32-
Elevate 2.0 contains breaking API changes that primarily consist of renaming existing type, method and parameter names. In addition, all protocols and APIs were updated to use `Any` rather than `AnyObject` types to match Apple's `JSONSerialization` API.
37+
Elevate 2.0 contains breaking API changes that primarily consist of renaming existing type, method and parameter names.
38+
In addition, all protocols and APIs were updated to use `Any` rather than `AnyObject` types to match Apple's `JSONSerialization` API.
3339

3440
### Swift 3
3541

3642
#### AnyObject to Any
3743

38-
In Swift 3, the `NSJSONSerialization` API became `JSONSerialization` and returns `[String: Any]` dictionaries rather than `[String: AnyObject]` dictionaries. We followed suit and updated all protocols and APIs to use `Any`.
44+
In Swift 3, the `NSJSONSerialization` API became `JSONSerialization` and returns `[String: Any]` dictionaries rather than `[String: AnyObject]` dictionaries.
45+
We followed suit and updated all protocols and APIs to use `Any`.
3946

4047
Here's a look at the old `Decodable` and `Decoder` protocols.
4148

@@ -66,7 +73,10 @@ All you need to do here is update your protocol conformance to use `Any` and als
6673

6774
#### Parse Object and Parse Array become Decode Object and Decode Array
6875

69-
The `Parser.parseObject` and `Parser.parseArray` APIs are provided as convenience methods to parse a top-level key path in a JSON document without having to build a schema for it. These methods do not actually perform the work of parsing, they simply create a lightweight schema for you and call the actual parsing APIs on your behalf. To clarify the intent and usage of these APIs they have been updated to `Elevate.decodeObject` and `Elevate.decodeArray` respectively. The parameter names have also been updated to follow Swift 3 API Design Guideline naming conventions.
76+
The `Parser.parseObject` and `Parser.parseArray` APIs are provided as convenience methods to parse a top-level key path in a JSON document without having to build a schema for it.
77+
These methods do not actually perform the work of parsing, they simply create a lightweight schema for you and call the actual parsing APIs on your behalf.
78+
To clarify the intent and usage of these APIs they have been updated to `Elevate.decodeObject` and `Elevate.decodeArray` respectively.
79+
The parameter names have also been updated to follow Swift 3 API Design Guideline naming conventions.
7080

7181
Here are the previous APIs in use:
7282
```swift
@@ -85,7 +95,9 @@ Many of these changes can be made with a global find and replace operation.
8595

8696
#### Creating a Schema and Parsing It
8797

88-
Elevate has always followed a maker pattern to build up the list of properties that you expect to be parsed for a given JSON document. The previous API was concise and read well, but did not clearly communicate what the developer was actually doing while following the pattern. The updated APIs more clearly represent the activity of building a schema in the body of the closure and parsing it.
98+
Elevate has always followed a maker pattern to build up the list of properties that you expect to be parsed for a given JSON document.
99+
The previous API was concise and read well, but did not clearly communicate what the developer was actually doing while following the pattern.
100+
The updated APIs more clearly represent the activity of building a schema in the body of the closure and parsing it.
89101

90102
Here is an example of the previous set of APIs.
91103
```swift
@@ -113,8 +125,12 @@ let entity = try Parser.parseEntity(json: json) { schema in
113125

114126
The `Parser.parseProperties` API has been updated to `Parser.parseEntity` to more clearly reflect the work that it is doing to parse the entity defined by your schema from the JSON document.
115127

116-
We highly recommend that you update the closure parameter name from `make` to `schema` throughout your code base. Schema more accurately communicates what is being built in the closure. The `propertyForKeyPath` API has also been updated to `addProperty` to reflect that each property is being added to the schema being built.
128+
We highly recommend that you update the closure parameter name from `make` to `schema` throughout your code base.
129+
Schema more accurately communicates what is being built in the closure.
130+
The `propertyForKeyPath` API has also been updated to `addProperty` to reflect that each property is being added to the schema being built.
117131

118132
#### Other Changes
119133

120-
To more accurately reflect their purpose the `ParserPropertyMaker` and `ParserProperty` APIs were updated to `Schema` and `SchemaProperty` respectively. You typically won't have references to these types directly in your source code. In addition, the enum used to indicate the type of each JSON property was updated from `JSONPropertyType` to `SchemaPropertyProtocol`.
134+
To more accurately reflect their purpose the `ParserPropertyMaker` and `ParserProperty` APIs were updated to `Schema` and `SchemaProperty` respectively.
135+
You typically won't have references to these types directly in your source code.
136+
In addition, the enum used to indicate the type of each JSON property was updated from `JSONPropertyType` to `SchemaPropertyProtocol`.

0 commit comments

Comments
 (0)