Add json_to_string usage example#776
Conversation
❌ Deploy Preview for splashkit failed.
|
RUNQILIU-123
left a comment
There was a problem hiding this comment.
Approved. This is a clear and beginner-friendly usage example for json_to_string. The example demonstrates the function well by converting a Json object back into a readable string, and the output is easy for beginners to understand. The added C++, C#, Python, title, and screenshot files are consistent with the expected usage example format. Good work.
rachelpatrao
left a comment
There was a problem hiding this comment.
The code and example implementation look good overall and everything appears to be working correctly.
One thing still needed is registering the new usage example in scripts/json-files/usage-example-references.json so it can be properly referenced and displayed in the documentation site. Once thats sorted it should be ready to approve!
Description
Splashkit Function:
json_to_stringOverview of example functionality:
This pull request adds a beginner-friendly usage example for the
json_to_stringfunction in the Json category.The example creates a Json object from a valid JSON string using
json_from_string(), then converts the Json object back into a readable string usingjson_to_string(). The original JSON string and converted output are printed to the terminal so beginners can clearly see what the function returns.This example helps users understand how SplashKit Json objects can be converted into text for display, debugging, or saving.
Files Included
Usage Example Checks
How Has This Been Tested?
The example was tested locally to confirm that:
json_to_string()converts the Json object into a readable stringTesting Checklist
Folders and Files Added/Modified
public/usage-examples/json/json_to_string-1-example.cpppublic/usage-examples/json/json_to_string-1-example-top-level.cspublic/usage-examples/json/json_to_string-1-example-oop.cspublic/usage-examples/json/json_to_string-1-example.pypublic/usage-examples/json/json_to_string-1-example.txtpublic/usage-examples/json/json_to_string-1-example.pngAdditional Notes
This example is designed to be simple and beginner-friendly. It focuses on demonstrating how
json_to_string()converts a SplashKit Json object into a string without adding unnecessary complexity.