-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Json Library. #455
Added Json Library. #455
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks pretty good to me. did you test this module in the homebrew & could you make the sample into [samples][https://github.com/vitasdk/samples] for it?
docs/Doxyfile
Outdated
@@ -2480,4 +2480,4 @@ GENERATE_LEGEND = YES | |||
# The default value is: YES. | |||
# This tag requires that the tag HAVE_DOT is set to YES. | |||
|
|||
DOT_CLEANUP = YES | |||
DOT_CLEANUP = YES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you keep the last return? :)
include/psp2/json.h
Outdated
typedef enum SceJsonError | ||
{ | ||
SCE_JSON_ERROR_UNINIT = 0x80920110, //!< The module has not been initialised. | ||
SCE_JSON_ERROR_REINIT = 0x80920111, //!< The module has already been initialised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about ERROR_UNLOADED
, ERROR_LOADED
?
include/psp2/json.h
Outdated
{ | ||
SCE_JSON_ERROR_UNINIT = 0x80920110, //!< The module has not been initialised. | ||
SCE_JSON_ERROR_REINIT = 0x80920111, //!< The module has already been initialised. | ||
SCE_JSON_ERROR_MEM_FAIL = 0x80920102, //!< Internal Memory Allocation failure(returned nullptr). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR_MEM_ALLOC
?
include/psp2/json.h
Outdated
SCE_JSON_ERROR_MEM_FAIL = 0x80920102, //!< Internal Memory Allocation failure(returned nullptr). | ||
SCE_JSON_PARSER_ERROR_EMPTY_BUF = 0x80920105, //!< InitParameter.unk_0x8 is 0. | ||
SCE_JSON_PARSER_ERROR_FILE_LOAD_FAIL = 0x80920103, //!< Parser failed to load file. | ||
SCE_JSON_PARSER_ERROR_BAD_CHAR = 0x80920101, //!< Invalid character in the parsed data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR_INVALID_TOKEN
?
Yes, I do have it working in a homebrew. I'll have to make those changes tomorrow, would you like me to squash them into the same commit as adding the header file or is a separate commit okay? |
well, i like to rebase to one header commit and one doxygen commit. :) |
There seems to be a lot of indentation issues in your json header. |
include/psp2/json.h
Outdated
*/ | ||
int serialize(String& s); | ||
/** | ||
* Serializes the values into a string in json format. Allows for a callback for the different stages in the serialization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add line breaks to keep the 80cols.
Adjusted some doxygen stuff, added SceLibJson defgroup
That seems to be due to github having tabs sized at around 2 or 3 spaces, I did indentation with tabs sized at 4 spaces so it does look a tad off on the site. |
Also, I made the changes you asked about |
8 space tabstop is ok. imo @joel16 told, method definitions has tab char in middle.
should be
|
Fixed the indentation issues |
Let's try again.