Daniel Larimer
dfe67a4494
adding blob type to variant
2014-10-15 23:32:37 -04:00
Eric Frias
4e83427df0
Improvements for handling unicode filenames on Windows. When converting fc::path to/from fc::variant, use utf8 encoding. Replace several places where we use a std::ifstream and open it with a char* filename with a boost::filesystem::ifstream and open it with a boost::filesystem::path, which does unicode correctly.
2014-10-09 16:21:52 -04:00
Nathan Hourt
07e3947ed4
Fix bug in json pretty printer which broke formatting and possibly
...
corrupted json
2014-09-17 13:27:37 -04:00
Eric Frias
751777e754
Fix more locations where we were making boost::asio calls with buffers declared on the stack which could cause problems when the calling tasks were canceled.
2014-09-11 16:30:03 -04:00
Eric Frias
aa6882b3b7
Allow us to safely cancel tasks that are executing asynchronous network reads
...
and writes. This was previously unsafe because we almost always passed read/write
buffers to boost that were on the stack. Canceling the task deleted the stack and
therefore the buffer, but couldn't reliably prevent boost from writing to the buffer
if data came in after the cancel. This commit adds variants of the read and write
functions that take a shared_ptr<char> instead of a raw char* as the buffer, and
these variants will ensure the shared_ptr will outlive the boost::asio read/write.
2014-09-09 11:10:37 -04:00
Nathan Hourt
9b6facea3f
Make the JSON parser less fragile
2014-09-08 10:12:42 -04:00
Eric Frias
d847f6469a
Allow us to require assigning descriptions to all async tasks to aid in debugging
2014-07-27 17:37:21 -04:00
dnotestein
9e320a3db8
Add descriptions for a bunch of async tasks, remove logging during thread::quit to avoid crashes for now until we cleanup thread quit code
2014-07-27 00:09:15 -04:00
Daniel Larimer
0a2a9ec25b
check for EOF while parsing quoted strings
2014-06-05 11:54:19 -04:00
Daniel Larimer
2e109d18c9
Merge branch 'phoenix' of https://github.com/InvictusInnovations/fc into HEAD
2014-06-04 22:18:39 +00:00
Daniel Larimer
df2d013bad
fix exceptions when parsing json
2014-06-04 22:17:21 +00:00
Eric Frias
ff04a5a8fb
Catch std::ios_base::failure exceptions, which mean EOF when reading JSON from a std::stringstream
2014-06-04 16:55:26 -04:00
HackFisher
174096c3ab
Fix issue #25
...
eofbit std exception is replaced by eof_exception, checked in peek(), so no need to throw std exception when encounter EOF.
2014-05-20 19:17:19 +08:00
Daniel Larimer
8a8ff28221
adding '/' to token chars to support paths
2014-05-19 16:59:01 -04:00
Eric Frias
c4770f0819
Restore correct parsing of json keywords (true/false/null)
2014-05-19 14:12:49 -04:00
Vikram Rajkumar
e8326ca66c
Make objectFromStream always throw parse_error_exception when throwing
2014-05-17 03:30:49 -04:00
Daniel Larimer
8c370b06e6
update json error handling
2014-05-15 17:44:38 -04:00
Daniel Larimer
7078ebf382
expanding token chars
2014-05-15 14:07:19 -04:00
Daniel Larimer
c27ea9ba13
fix bugs parsing json tokens
2014-05-15 13:52:21 -04:00
Daniel Larimer
271fe8b909
found major bug in parsing, fixed it
2014-05-15 13:35:49 -04:00
Daniel Larimer
8d4fccba5f
update pretty print save to file
2014-05-11 20:33:08 -04:00
Daniel Larimer
9378f6c7aa
Merge branch 'phoenix' of https://github.com/InvictusInnovations/fc into phoenix
2014-05-07 21:27:48 -04:00
Daniel Larimer
3a34299199
update json validation and varint hashing
2014-05-07 21:27:37 -04:00
Eric Frias
b8a7531eab
Fix error message printed when unable to deserialize a json object, improve
...
logging of return values and add logging of exceptional returns from
json function calls. Continue my endless quest to break the mac build.
2014-05-06 17:20:04 -04:00
Eric Frias
9731fac9f3
Fix error parsing a numeric constant at the end of file
2014-04-22 18:35:36 -04:00
Eric Frias
c3ea6cc62c
Assert to warn when calling unimplemented functions
2014-04-22 18:35:36 -04:00
Eric Frias
cd34f696ce
- Add four-argument version of json-rpc call function
...
- fix bug in json parser that prevented correct parsing of
a true/false/null at the end of input
- prevent infinite recursion in a json helper function
2014-04-21 14:34:46 -04:00
Daniel Larimer
51a3d1126f
fix console
2014-03-21 01:14:01 -04:00
dnotestein
503b9033e8
fix infinite loop in windows when trying to read json variant from empty file
2014-02-27 21:56:46 -05:00
Daniel Larimer
0843aa6652
adding raw serialization for unordered_map
2014-02-16 01:17:31 -05:00
Daniel Larimer
2743b56b56
added utility to hide console echo for entering passwords
2014-02-15 14:06:35 -05:00
Daniel Larimer
4571ce36d5
fix bug in json file loading, see issue #8
2014-02-13 01:47:08 -05:00
vogel76
59f80e34d2
[BW]: [NIP] Further changes to get to work paths containing unicode characters:
...
- fc::path extended by method toNativeAnsiPath allowing to safely convert current unicode path into its ansi equivalent
- fc::path to_variant uses toNativeAnsiPath method instead of generic_string to avoid loss of data while serializing a path
- fc::mmap_struct_base::open should use toNativeAnsiPath method instead of generic_string to access ansi path
- fc::json::save_to_file should directly pass fc::path to underlying stream instead of generic_string.
2014-01-10 00:05:18 +01:00
vogel76
c2026efd56
[BW]: [Fix] Fixed ifstream/ofstream to be able to open unicode paths.
2014-01-09 17:00:41 +01:00
Daniel Larimer
e1e3a7361b
added flexability to json parsing and fixed closing hang in json rpc connection
2013-11-24 22:23:29 -05:00
Daniel Larimer
105948ea65
json and variant bug fixes
2013-08-15 12:44:51 -04:00
Daniel Larimer
d2635d0f8b
fix pretty print
2013-07-30 00:28:37 -04:00
Daniel Larimer
a792cfaca7
update save to file to take fc::path
2013-07-18 19:09:18 -04:00
Daniel Larimer
b59fe17562
Merge branch 'phoenix' of github.com:bytemaster/fc into phoenix
...
Remove fc::vector and fc::string
2013-06-27 14:45:11 -04:00
Daniel Larimer
b07aed4a22
Update use of fc::string and fc::vector.
2013-06-27 14:19:08 -04:00
Daniel Larimer
a4a00717ef
restore json pretty print
2013-06-06 23:42:20 -04:00
Daniel Larimer
59a121d64b
Updating FC with changes from phoenix-int
2013-06-05 15:19:00 -04:00