Ranter
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
Comments
-
Are you sure it's not a bug in the syntax highlighting of their API docs (presuming there are highlighting)
-
uberblah3127yNotice this bit: {3}
I don't think this is even valid JSON. Probably some proprietary garbage -
ebroda1857y@uberblah i think These Numbers are replaced by the values.
But "Numbe" as the Key for number ... rly? -
@juneeighteen a library for Java made by Google it is the best thing happened to JSON it's easy to parse and convert to JSON
@ebroda good point, I honestly didn't bother reading the code until I reach implementation part after reading docs, those {x} will make me blind trying to follow
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
MoboTheHobo35My Friend: Dude our Linux Server is not working anymore! Me: What? What did you do? My friend: Nothing I swe...
-
tommy15Right now someone at Google is coding something useless for us to laugh at on April Fools.
Going through Master Card API docs to see how to integrate it, saw that they have sample code, checked Java sample code and found this:
String data = MessageFormat.format(
"'{'\"apiOperation\":{0},"
+ "\"sourceOfFunds\":'{'\"type\":{1},\"provided\":'{'\"card\":'{'\"numbe\":{2},"
+ "\"expiry\":'{'\"month\":{3}, \"year\":{4}'}',\"securityCode\":{5}'}}}',"
+ "\"order\":'{'\"reference\":{6}'}',"
+ "\"transaction\":'{'\"amount\":{7},\"currency\":{8},\"reference\":{9},\"targetTransactionId\":{10}'}'," + "\"customer\":'{'\"ipAddress\":{11}'}}'",
apiOperation,
sourceOfFundsType,
cardNumber,
cardExpiryMonth,
cardExpiryYear,
cardSecurityCode,
orderReference,
transactionAmount,
transactionCurrency,
transactionReference,
targetTransactionId,
customerIpAddress );
FOR FUCK SAKE what happened to JSONObject (for Android) class, I'm sure it is a waaaay better solution than that mess ...
And from Oracle:
JsonObject value = Json.createObjectBuilder()
.add("firstName", "John")
.add("lastName", "Smith")
.add("age", 25)
.build();
I guess that is a cleaner understandable solution than what master card has.
undefined
please help
fml
are they serious
wtf
why?