https://github.com/mdsol/crichton-dotnet
https://github.com/mdsol/crichton-dotnet
chief-data-office study-conduct
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mdsol/crichton-dotnet
- Owner: mdsol
- License: mit
- Archived: true
- Created: 2014-04-04T05:53:30.000Z (about 12 years ago)
- Default Branch: develop
- Last Pushed: 2017-03-01T08:09:30.000Z (over 9 years ago)
- Last Synced: 2025-12-24T23:34:44.875Z (5 months ago)
- Topics: chief-data-office, study-conduct
- Language: C#
- Size: 12.4 MB
- Stars: 10
- Watchers: 510
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Crichton.NET
Crichton is a library to simplify generating and consuming Hypermedia API responses. It has the knowledge of Hypermedia
from the Ancients.
This is a .NET/C# port of the Ruby library at http://www.github.com/mdsol/crichton.
## Components
### Crichton.Representors
This is the core library, containing Serializers and Hypermedia Representors.
* [RepresentorBuilder][].
#### Hypermedia format support
##### HAL+JSON
The following is supported in the HAL+JSON Serializer implemented by ```HalSerializer``` as defined by http://tools.ietf.org/html/draft-kelly-json-hal.
Spec | Support
--- | ---
4. Resource Objects | ✔
4.1. Reserved Properties | ✔
4.1.1. _links | ✔
4.1.2. _embedded | ✔
5. Link Objects | ✔
5.1. href | ✔
5.2. templated | ✔
5.3. type | ✔
5.4. deprecation | ✔
5.5. name | ✔
5.6. profile | ✔
5.7. title | ✔
5.8. hreflang | ✔
7. Media Type Parameters | ✔
7.1. profile | ✔
8. Recommendations | ✔
CURIE syntax | ❌
The HAL+JSON Serializer is complete apart from CURIEs.
##### HALE+JSON
The HALE+JSON Serializer supports everything the HAL+JSON Serializer does above. HALE+JSON is defined by the spec at https://github.com/mdsol/hale/blob/master/README.md. It is implemented by ```HaleSerializer```.
Spec | Support
--- | ---
4. Link Objects | ✔
4.1. method | ✔
4.2. data | ✔
4.3. render | ✔
4.4. enctype | ✔
4.5. target | ✔
5. Data Objects | ✔
5.1. Data Properties | ✔
5.1.1. type | ✔
5.1.2. data | ✔
5.1.3. scope | ✔
5.1.4. profile | ✔
5.1.5. value | ✔
5.2 Constraint Properties | ✔
5.2.1. options | ✔
5.2.2. in | ✔
5.2.3. min | ✔
5.2.4. minlength | ✔
5.2.5. max | ✔
5.2.6. maxlength | ✔
5.2.7. pattern | ✔
5.2.8. multi | ✔
5.2.9 required | ✔
5.3 Constraint Extensions | ❌
6. Resource Objects | ❌
6.1. Reserved Properties | ❌
6.1.1 _meta | ❌
7. Reference Objects | ❌
7.1. Reserved Properties | ❌
7.1.1. _ref | ❌
7.1.1.1. String values | ❌
7.1.1.2. Link Object values | ❌
The HALE+JSON Serializer is not complete.
##### Other formats
We hope to support other formats such as Collection+JSON, Siren etc in the future.
## Contributing
See [CONTRIBUTING][] for details.
## Copyright
Copyright (c) 2016 Medidata Solutions Worldwide. Licensed under MIT. See [LICENSE][] for details.
## Authors
* [Ed Andersen](https://github.com/edandersen) - [@edandersen](https://twitter.com/edandersen)
* [Kenya Matsumoto](https://github.com/kenyamat)
* Based on the work by [Mark W. Foster](https://github.com/fosdev)
[CONTRIBUTING]: CONTRIBUTING.md
[LICENSE]: LICENSE.md
[RepresentorBuilder]: docs/representor_builder.md
[BenchmarkTool]: docs/representor_benchmark_tool.md