Skip to content

Commit

Permalink
deprecate #asJson [feenkcom/gtoolkit#3895]
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Jul 14, 2024
1 parent 27b784f commit a821f71
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 7 deletions.
11 changes: 10 additions & 1 deletion src/GToolkit4Json/Dictionary.extension.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
Extension { #name : #Dictionary }

{ #category : #'*GToolkit4Json' }
Dictionary >> asJson [
Dictionary >> asGtJson [

^ GtJson forJsonObject: self
]

{ #category : #'*GToolkit4Json' }
Dictionary >> asJson [
self
deprecated: 'Please use #asGtJson instead.'
transformWith: '`@receiver asJson' -> '`@receiver asGtJson'.

^ self asGtJson
]

{ #category : #'*GToolkit4Json' }
Dictionary >> gtJsonValueDisplayText [
^ self size gtDisplayText
Expand Down
11 changes: 10 additions & 1 deletion src/GToolkit4Json/GtJsonBasic.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,20 @@ GtJsonBasic >> allValuesDepthFirstDo: aBlock [
]

{ #category : #converting }
GtJsonBasic >> asJson [
GtJsonBasic >> asGtJson [

^ self
]

{ #category : #converting }
GtJsonBasic >> asJson [
self
deprecated: 'Please use #asGtJson instead.'
transformWith: '`@receiver asJson' -> '`@receiver asGtJson'.

^ self asGtJson
]

{ #category : #converting }
GtJsonBasic >> asJsonString [

Expand Down
3 changes: 1 addition & 2 deletions src/GToolkit4Json/GtJsonModelExamples.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,8 @@ GtJsonModelExamples >> primaryAddressModel_JsonValues [

{ #category : #'examples - person' }
GtJsonModelExamples >> simplePersonJson [

<gtExample>
^ GtJsonExamples new simplePersonJsonObject asJson.
^ GtJsonExamples new simplePersonJsonObject asGtJson
]

{ #category : #'examples - simple person' }
Expand Down
11 changes: 10 additions & 1 deletion src/GToolkit4Json/OrderedDictionary.extension.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
Extension { #name : #OrderedDictionary }

{ #category : #'*GToolkit4Json' }
OrderedDictionary >> asJson [
OrderedDictionary >> asGtJson [

^ GtJson forJsonObject: self
]

{ #category : #'*GToolkit4Json' }
OrderedDictionary >> asJson [
self
deprecated: 'Please use #asGtJson instead.'
transformWith: '`@receiver asJson' -> '`@receiver asGtJson'.

^ self asGtJson
]

{ #category : #'*GToolkit4Json' }
OrderedDictionary >> gtJsonValueDisplayText [
^ self size gtDisplayText
Expand Down
11 changes: 10 additions & 1 deletion src/GToolkit4Json/SequenceableCollection.extension.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
Extension { #name : #SequenceableCollection }

{ #category : #'*GToolkit4Json' }
SequenceableCollection >> asJson [
SequenceableCollection >> asGtJson [

^ GtJson forJsonObject: self
]

{ #category : #'*GToolkit4Json' }
SequenceableCollection >> asJson [
self
deprecated: 'Please use #asGtJson instead.'
transformWith: '`@receiver asJson' -> '`@receiver asGtJson'.

^ self asGtJson
]
11 changes: 10 additions & 1 deletion src/GToolkit4Json/ZnMessage.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Extension { #name : #ZnMessage }

{ #category : #'*GToolkit4Json' }
ZnMessage >> asJson [
ZnMessage >> asGtJson [
^ GtJson forJsonString: self contents
]

{ #category : #'*GToolkit4Json' }
ZnMessage >> asJson [
self
deprecated: 'Please use #asGtJson instead.'
transformWith: '`@receiver asJson' -> '`@receiver asGtJson'.

^ self asGtJson
]

0 comments on commit a821f71

Please sign in to comment.