Skip to content
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

Merged
merged 2 commits into from
Jul 13, 2020
Merged

Added Json Library. #455

merged 2 commits into from
Jul 13, 2020

Conversation

bythos14
Copy link
Contributor

@bythos14 bythos14 commented Jul 9, 2020

Let's try again.

@bythos14 bythos14 changed the title Json Library. Added Json Library. Jul 9, 2020
Copy link
Contributor

@d3m3vilurr d3m3vilurr left a 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
Copy link
Contributor

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? :)

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.
Copy link
Contributor

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?

{
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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR_MEM_ALLOC?

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR_INVALID_TOKEN?

@bythos14
Copy link
Contributor Author

bythos14 commented Jul 9, 2020

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?

@d3m3vilurr
Copy link
Contributor

well, i like to rebase to one header commit and one doxygen commit. :)

@joel16
Copy link
Contributor

joel16 commented Jul 9, 2020

There seems to be a lot of indentation issues in your json header.

*/
int serialize(String& s);
/**
* Serializes the values into a string in json format. Allows for a callback for the different stages in the serialization.
Copy link
Contributor

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
@bythos14
Copy link
Contributor Author

bythos14 commented Jul 9, 2020

There seems to be a lot of indentation issues in your json header.

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.
EDIT: 8 spaces is the default actually.

@bythos14
Copy link
Contributor Author

bythos14 commented Jul 9, 2020

Also, I made the changes you asked about

@d3m3vilurr
Copy link
Contributor

8 space tabstop is ok. imo @joel16 told, method definitions has tab char in middle.

	void		setAllocatorInfoCallBack(AllocatorInfoCallback cb, void* unk0);

should be

	void setAllocatorInfoCallBack(AllocatorInfoCallback cb, void* unk0);

@bythos14
Copy link
Contributor Author

Fixed the indentation issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants