Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm writing some routin to manage files in Json format.
the file format specified on www.json.org is very clear... but I cant relly get the mean of the exceptions on 'chars' type.
There is written:

char
    any-Unicode-character-
        except-"-or-\-or-
        control-character
    \"
    \\
    \/
    \b
    \f
    \n
    \r
    \t
    \u four-hex-digits


I'm not understanding 2 lines.
In C++ looks that the chars \f and \u are not included. (Any way to have a understandable print-out on console)
What are their mean??
Posted

1 solution

As you can see at Escape Sequences (C)[^], the escape sequence \f is included in C++ and stays for formfeed.
About the \u escape sequence, I suppose that in Json it should be treated as unicode character in hexadecimal notation (i.e. in the same way the \xhhhh escape sequence is treated by C++).

Cheers,
Sauro
 
Share this answer
 
Comments
Russell' 29-Sep-10 5:56am    
It look you solved both my problems.
Bravo Sauro!
Sauro Viti 29-Sep-10 5:59am    
Mi fa piacere! Grazie!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900