Closed Bug 775798 Opened 13 years ago Closed 13 years ago

Remove "\u000a" escaping from the sync2.0 spec

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rfkelly, Assigned: rfkelly)

References

Details

(Whiteboard: [qa+])

Attachments

(1 file)

The spec currently defines application/newlines output as: application/newlines: each BSO is sent as a separate JSON object on its own line. Newlines in the body of the BSO object are replaced by ‘\u000a’. I don't think this is necessary. Any newlines in the BSO payload must already be escaped as "\n" for it to be valid JSON. The only place literal newlines could occur is as insignificant whitespace in the structure of the JSON, in which case we're better off just deleting them than trying to add extra bytes to escape them. I propose we remove all discussion of the '\u000a' escaping. In the section on uploading application/newlines format data, we can add a note along the lines of "make sure your json library doesn't add newlines in an attempt to make the output human-readable".
Blocks: 720964
Whiteboard: [qa+]
I think you're correct. As the payloads are currently constructed, a newline is impossible. I don't think you even need to call out the lack of escaping - we'll reject the payload upon submission.
+1 to removal. If we find some client absolutely needs newlines because a JSON encoder is inserting them, we can add the feature back in.
Attachment #644816 - Flags: review?(telliott) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: 776770
Surely you could translate newlines into straight \n in the JSON payload? After all, they must be occurring outside of a literal string, so we can do whatever we like…
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: