Permalink
Browse files

spaces to tabs

  • Loading branch information...
lm committed Feb 16, 2012
1 parent 0f8e9e1 commit ed4dfe83eeeb9681478e6ad360c11084017e0200
@@ -1,13 +1,13 @@
Association extend [
- jsonWriteOn: aStream [
+ jsonWriteOn: aStream [
<category: '*JSON-writing'>
self key asString jsonWriteOn: aStream.
aStream
- nextPut: $:;
- space.
+ nextPut: $:;
+ space.
self value jsonWriteOn: aStream
- ]
+ ]
]
View
@@ -1,14 +1,14 @@
Collection extend [
- jsonWriteOn: aStream [
+ jsonWriteOn: aStream [
"By default, use array braces"
<category: '*json'>
aStream nextPut: $[.
self do: [:each | each jsonWriteOn: aStream]
- separatedBy: [aStream nextPut: $,].
+ separatedBy: [aStream nextPut: $,].
aStream nextPut: $]
- ]
+ ]
]
View
@@ -1,18 +1,18 @@
Dictionary extend [
- jsonWriteOn: aStream [
+ jsonWriteOn: aStream [
<category: '*JSON-writing'>
| needComma |
needComma := false.
aStream nextPut: ${.
- self associationsDo:
- [:assoc |
+ self associationsDo:
+ [:assoc |
needComma ifTrue: [aStream nextPut: $,] ifFalse: [needComma := true].
assoc key jsonWriteOn: aStream.
aStream nextPut: $:.
assoc value jsonWriteOn: aStream].
aStream nextPut: $}
- ]
+ ]
]
View
@@ -1,9 +1,9 @@
False extend [
- jsonWriteOn: aStream [
+ jsonWriteOn: aStream [
<category: '*JSON-writing'>
aStream nextPutAll: 'false'
- ]
+ ]
]
View
@@ -1,9 +1,9 @@
Integer extend [
- jsonWriteOn: aWriteStream [
+ jsonWriteOn: aWriteStream [
<category: '*JSON-writing'>
^self printOn: aWriteStream base: 10
- ]
+ ]
]
View
@@ -1,9 +1,9 @@
Number extend [
- jsonWriteOn: aWriteStream [
+ jsonWriteOn: aWriteStream [
<category: '*JSON-writing'>
self printOn: aWriteStream base: 10
- ]
+ ]
]
View
@@ -1,9 +1,9 @@
Object extend [
- asJsonString [
+ asJsonString [
<category: '*JSON'>
^String streamContents: [:str | self jsonWriteOn: str]
- ]
+ ]
]
View
@@ -1,15 +1,15 @@
String extend [
- jsonWriteOn: aStream [
+ jsonWriteOn: aStream [
<category: '*JSON-writing'>
| replacement |
aStream nextPut: $".
- self do:
- [:ch |
+ self do:
+ [:ch |
replacement := (Json escapeForCharacter: ch) asString.
aStream nextPutAll: replacement].
aStream nextPut: $"
- ]
+ ]
]
View
@@ -1,9 +1,9 @@
True extend [
- jsonWriteOn: aStream [
+ jsonWriteOn: aStream [
<category: '*JSON-writing'>
aStream nextPutAll: 'true'
- ]
+ ]
]
@@ -1,9 +1,9 @@
UndefinedObject extend [
- jsonWriteOn: aWriteStream [
+ jsonWriteOn: aWriteStream [
<category: '*JSON-writing'>
aWriteStream nextPutAll: 'null'
- ]
+ ]
]
@@ -1,9 +1,9 @@
WriteStream extend [
- jsonPrint: anObject [
+ jsonPrint: anObject [
<category: '*json-printing'>
anObject jsonWriteOn: self
- ]
+ ]
]
Oops, something went wrong.

0 comments on commit ed4dfe8

Please sign in to comment.