I'm new to Dzego-Tstip when I try to create an API using the following code,
Category PrettyJSONSerializer (serializer): json_indent = 4 def to_json (self, data, option = none): Print '......... .........' options = Options or {} data = self.to_simple (data, options) return simplejson.dumps (data, cls = json.DjangoJSONEncoder, sort_keys = true, make_acciI = fault, indent = self.json_indent) class shipment processing model (ModelResource) : Class Meta: Returns the output shown below, "e-mail", "ATD_Ata": "2013". -04-14 "," From_to ":" KKD- "PO-123", "Resource_Ouri": "/ API / Shipment / 1 /", "HID", "ID": 1, "Mode": "Transport" "W.B.A.", "BWAB", "Carrier", "WR-123"}, "PW": "10.00", "PO" status ":" W "," Weight ":" 25.00 "," wr " : "", "Idiots": "green", "atadeta": "2013-" PO ":" OP-123 "," resource_uri ":" APP-HOV "," ID ": 3," mode ":" transport "," pieces ": "1.30", " "O": "O", "o", "weight": "1.40", "wr": "RW 45"}}}} ":" / API / shipment / 3 / "," st eats " P>
ATD_ATA ":" 2013-04-14 "," SE-TO ":" KKD "PO-123", "Resource_Ouri": "/ API / Shipment / 1 /", "Transport", "Pieces": "10.00" "" "W", "WR", "" "", "id": 1, "mode" "position": "w", "weight": "25.00", "wr": "" awb_bol ": "BWAB", "Carrier": "Green", "Atadata": "2013 -04-23", "From-To": "AMP-Hiva "", "Id": "id": 3, "mode": "transport", "pieces": "1.30", "po": "OP-123", "resource_uri": "/ Api / ship / / 3 /", "Status": "O", "Weight": "1.40", "wr": "RW 45"}}}
Is there any default functionality available in Dzego-Tstip Please solve my problem Thank you ..
separator = [',', ': '] Parameter
return simplejson.dumps (data, cls = json.DjangoJSONEncoder, sort_keys = true, make_cci = false, indent = self.json_indent, sep This work is fine with the standard Python JSN Library, but for the sake of their liking, I think this is the same. To avoid the wrong response to the page, I will reply to you in response to the content_type = / Json page.
No comments:
Post a Comment