Skip to content

andreitudorica/Google-Code-In-2014

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

JSON-BSON and BSON-JSON converter

The JBUtils.java file contains 7 functions:

Function Description
ReadJSONfromFile it takes as a parameter the path of the input file, reads a string, converts it into a JSONObject and returns it.
ReadBSONfromFile it takes as a parameter the path of the input file, reads a byte array, deserialises it into a BSONObject and returns it.
PrintJSONtoFile it takes as parameters the JSONObject and the path of the output file, converts the JSONObject into a string and prints it.
PrintBSONtoFileDecoded it takes as parameters the BSONObject and the path of the output file, converts the BSONObject into a string and prints it.
PrintBSONtoFileEncoded it takes as parameters the BSONObject and the path of the output file, converts the BSONObject into a byte array, the byte array into a string and prints it.
JSONtoBSON it takes as a parameter the JSONObject, converts it into a decoded BSONObject and returns it.
BSONtoJSON it takes as a parameter the decoded BSONObject, converts it into a JSONObject and returns it.

the Main.java file contains just the calls to the functions previously described. GCI task

About

GCI task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages