 	# This method is used to initialize the resource after it's been created - i.e. including the constructor and JSON deserialization
 	$_init: ->
 
+	# If there's a resource requester extending BaseRequester that declares this class as its $_resourceClass, then for each of the non-GET
+	# actions it declares, there can be two corresponding methods on each instance of this class returned by its various actions according to the
+	# following rule:
+	# For successful post-processing of the action: $actionSuccess( resourceResponse, headersGetter ) ->
+	# For erroneous post-processing of the action: $actionError( resourceResponse, headersGetter ) ->
+
 	$_toJson: ->
 		json = {}
 

			jsonExpressionSetter = @$parse( jsonExpression ).assign
			jsonExpressionSetter json, propertyExpressionGetter @

		# Assign all the aggregated resources
		angular.forEach @$_propertyToResourceJsonMapping, ( aggregateResourceDefinition, propertyExpression ) =>
			propertyExpressionGetter = @$parse propertyExpression

			angular.forEach aggregateResourceDefinition, ( resourceClass, jsonExpression ) =>
				jsonExpressionSetter = @$parse( jsonExpression ).assign

				jsonAggregateResources = new Array()
				isPropertyArray = no

				aggregatedResourceObjectOrArray = propertyExpressionGetter @
				return unless angular.isDefined aggregatedResourceObjectOrArray

				if aggregatedResourceObjectOrArray instanceof resourceClass
				# If the property is an instance of the given resource
					jsonAggregateResources.push aggregatedResourceObjectOrArray.$_toJson()

				else if angular.isArray aggregatedResourceObjectOrArray
				# If the property is an array of instances of the given resource class
					isPropertyArray = yes

					for aggregatedResource in aggregatedResourceObjectOrArray
						jsonAggregateResources.push aggregatedResource.$_toJson() if aggregatedResource instanceof resourceClass

				else if angular.isObject( aggregatedResourceObjectOrArray )
				# If the property is actually a hash of the given resource
					isPropertyArray = yes

					for aggregatedResource of aggregatedResourceObjectOrArray
						jsonAggregateResources.push aggregatedResource.$_toJson() if aggregatedResource instanceof resourceClass

				if isPropertyArray or jsonAggregateResources.length > 1
					jsonExpressionSetter json, jsonAggregateResources
				else
					jsonExpressionSetter json, jsonAggregateResources[ 0 ]

		angoolar.delete json, 'this' if @$_useThis


		for property, apiParameter of @$_propertyToApiMapping
			@[ property ] = parameters[ apiParameter ] if parameters?[ apiParameter ]?

		@$_getResourcesFrom parameters, @$_propertyToResourceApiMapping

		@ # for method chaining