Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Search - "slack face palm"
		
- 
				    					
					
					// Stupid JSON
 // Tale of back-end ember api from hell
 // Background: I'm an android dev attempting to integrate // with an emberjs / rails back-end
 
 slack conversation:
 me 3:51pm: @backend-dev: Is there something of in the documentation for the update call on model x? I formed the payload per the docs like so
 {
 "valueA": true,
 "valueB": false
 }
 and the call returns success 200 but the data isn't being updated when fetching again.
 ----------------------------------------------------------------------------------------
 backend-dev 4:00pm: the model doesn't look updated for the user are you sure you made the call?
 ----------------------------------------------------------------------------------------
 me 4:01pm: Pretty sure here's my payload and a screen grab of the successful request in postman <screenshot attached>
 ----------------------------------------------------------------------------------------
 backend-dev 4:05pm: well i just created a new user on the website and it worked perfectly your code must be wrong
 ----------------------------------------------------------------------------------------
 me 4:07pm: i can test some more to see if i get any different responses
 ----------------------------------------------------------------------------------------
 backend-dev 4:15pm: ahhhhhh... I think it's expecting the string "true", not true
 ----------------------------------------------------------------------------------------
 me 4:16: but the fetch call returns the json value as a boolean true/false
 ----------------------------------------------------------------------------------------
 backend-dev 4:18pm: thats a feature, the flexible type system allows us to handle all sorts of data transformations. android must be limited and wonky.
 ----------------------------------------------------------------------------------------
 me 4:19pm: java is a statically typed language....
 // crickets for ten minutes
 me 4:30pm: i'll just write a transform on the model when i send an update call to perform toString() on the boolean values
 ----------------------------------------------------------------------------------------
 backend-dev 4:35: great! told you it wasn't my documentation!
 
 // face palm forever4

