Create a JSON Binary Parser

Completato Pubblicato 6 anni fa Pagato alla consegna
Completato Pagato alla consegna

JSON binary parser

------------------

To optimize the amount of data sent between the web browser to the web server

a "clever" Javascript developer came up with the idea to translate JSON objects

into binary format in the application and send them to the server. Faced with

the fact that the Javascript is released in its final version to the customer

it is now your task to develop the parser on the back end system.

A JSON object is a hierarchy of key-value pairs where a value in its turn can

contain new key-value pairs. It consists of four basic types: numbers, strings,

arrays and dictionaries. An array is a list of values and a dictionay is a list

of key-value pairs. The key can only be of the type number or string while a

value can be of any type.

A JSON object always starts with a value.

An example JSON object can look like:

{

'firstName': 'John',

'lastName': 'Smith',

'age': 25,

'address': {

'streetAddress': '21 2nd Street',

'city': 'New York',

'state': 'NY',

'postalCode': '10021'

},

'phoneNumber': [

{ 'type': 'home', 'number': '212 555-1234' },

{ 'type': 'fax', 'number': '646 555-4567' }

]

}

The binary representation of the JSON object contains an one byte identifier

that describes the type of the data to follow and is then immediately followed

by the data.

The identifiers and their types are as follows:

Identifier Type Description

0x01 Number 4 bytes signed integer in big endian byte order.

0x02 String N ASCII characters terminated by 0x00.

0x05 List Amount of items as a number followed by N values

0x06 Dictionary Amount of items as a number followed by N

key-value pairs

The program's task is to parse a binary file and print it as human readable

text. It should read the data from standard input and write the result to

standard output.

Look at the files 'input_x' and their respective 'result_x' for examples of

input and output.

HTML5 JavaScript JSON

Rif. progetto: #14214358

Info sul progetto

11 proposte Progetto a distanza Attivo 6 anni fa

Assegnato a:

satyajeetkeshari

Hi , If looking for a good experienced web developer, then your are on right place. Development is my skill & passion. I am having more that 9 years experienced in web development of corporate websites and web a Altro

$13 USD in 1 giorno
(16 valutazioni)
3.4

11 freelance hanno fatto un'offerta media di $24 per questo lavoro

drgold03

Hello, I am an expert in javascript/ json. I have a lot of experience in javascript/ json. Please contact me to discuss the details. thanks

$25 USD in 1 giorno
(43 valutazioni)
6.1
imRaziel

hi. i can do it. what language do you use for server side ?

$20 USD in 1 giorno
(20 valutazioni)
4.6
chintanhingrajia

Dear Hiring Manager! I strongly believe I can make a significant contribution to Web Developers. I can finish this job within the necessary time frame. I will be serving you with all my hard work and skills. My web Altro

$25 USD in 1 giorno
(4 valutazioni)
2.5
renukaparauha

Hello, I want to show you all relevant Demo and Designs which is similar to your project completed previously. To make sure about the requirement set and customizations, I want to discuss this project with you further Altro

$25 USD in 1 giorno
(0 valutazioni)
0.0
bethwelkim

Hi, I accomplish the task in 2 days at the specified cost. Thanks.

$20 USD in 2 giorni
(0 valutazioni)
0.0
mrigankakar7

........................................................................................................................................

$25 USD in 1 giorno
(0 valutazioni)
0.0
shaliniramadass

Hi, we are a 1000 + employee firm. Charging 6$ an hour. Can start any technology immediately. Direct access to developers via Skype, G talk and hotline – 24/7 availability for all 1000+ resource. We can bet you that no Altro

$25 USD in 2 giorni
(0 valutazioni)
0.0