Skip to content

Commit 073de48

Browse files
committed
unify code fence examples to JSON
fix ember-learn#565. I did a quick search and didn't find other obvious examples. There could be more and this can easily happen without automating linting or formatting the files before a commit (prettier). See https://github.com/ember-learn/guides-source/blob/master/extractCode.js for initial work.
1 parent 90f8162 commit 073de48

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

guides/release/models/customizing-serializers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export default DS.Model.extend({
293293
However, the `JSONAPISerializer` expects attributes to be dasherized
294294
in the document payload returned by your server:
295295

296-
```javascript
296+
```json
297297
{
298298
"data": {
299299
"id": "44",
@@ -370,7 +370,7 @@ export default DS.Model.extend({
370370

371371
The JSON should encode the relationship as an array of IDs and types:
372372

373-
```javascript
373+
```json
374374
{
375375
"data": {
376376
"type": "posts",
@@ -406,7 +406,7 @@ export default DS.Model.extend({
406406

407407
The JSON should encode the relationship as an ID to another record:
408408

409-
```javascript
409+
```json
410410
{
411411
"data": {
412412
"type": "comment",
@@ -469,7 +469,7 @@ export default DS.Model.extend({
469469
When `coordinatePoint` is received from the API, it is
470470
expected to be an array:
471471

472-
```javascript
472+
```json
473473
{
474474
cursor: {
475475
position: [4,9]
@@ -717,7 +717,7 @@ export default DS.Model.extend({
717717
The normalized JSON object that Ember Data expects a serializer to
718718
return looks like this:
719719

720-
```javascript
720+
```json
721721
{
722722
data: {
723723
id: "1",
@@ -728,8 +728,8 @@ return looks like this:
728728
},
729729
relationships: {
730730
comments: {
731-
data: [{ id: "1", type: 'comment' },
732-
{ id: "2", type: 'comment' }],
731+
data: [{ id: "1", type: "comment" },
732+
{ id: "2", type: "comment" }],
733733
},
734734
relatedPosts: {
735735
links: {

0 commit comments

Comments
 (0)