function to parse betfair marketPrices string into MarketPrices java object
$30-5000 USD
Completed
Posted over 16 years ago
$30-5000 USD
Paid on delivery
I would like to be able to use the GetMarketPricesCompressed betfair API service. However they don't offer an example of parsing the string output of that function back into the MarketPrices objects. Basically you are going to be using the documentation, to break up a string like this; 5082333~GBP~ACTIVE~0~1~NR\: (RSA) 8. Fan Mail (0%,11\:07), 6(2.5%,11\:08)~true~5.0~1162835723938~6. Earlswood,9.08,2.5;8. Fan Mail,9.07,2.4;:1058616~0~6.04~8.4~~11.9~false||:670160
~1~6.18~17.5~~4.2~false||:1132008~2~9.78~5.2~~20.4~false||
:894820~3~140.02~4.6~~20.4~false||1.01~5.0~B~1~:1414415~
4~8.2~6.2~~16.0~false||:575636~5~5.54~11.5~~8.6~false||:143
3455~6~0.0~~~0.4~false||:1433456~7~0.0~~~0.9~false||:746753
~8~5.54~11.5~~5.2~false||:1433457~9~0.0~~~4.2~
false||:1147548~10~0.0~~~2.6~false||:1433458~11~62.46~2.0~~3.5
~false||:1433459
~12~0.0~~~0.9~false||:1433460~13~0.0~~~0.9~false|| into its components, and recreating the MarketPrices objects. Its essentially deserializing that string back to an object. The API documentation is here; [login to view URL] The relevant sections are; Get Market Prices Compressed (exchange) in the "Read-Only Betting API Services Reference" section. And the object to be recreated is "MarketPrices" you can download the Java sample here; [login to view URL] I am looking for this to be delivered as a java class with a static function that takes a string, and returns a MarketPrices object. The types are available in the java application sample above.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
java 1.5