xScatta Posted June 16, 2016 Posted June 16, 2016 Hey, guys i heard of that the toJSON function has got limit to 64kb, about 65k symbols, is that true? If it is, can i somehow get around that limit? It's fine to celebrate success but it is more important to heed the lessons of failure.
xScatta Posted June 16, 2016 Author Posted June 16, 2016 Let's wait for some sure answer, *BUMP*. It's fine to celebrate success but it is more important to heed the lessons of failure.
xScatta Posted June 16, 2016 Author Posted June 16, 2016 *BUMP* It's fine to celebrate success but it is more important to heed the lessons of failure.
KariiiM Posted June 16, 2016 Posted June 16, 2016 I can confirm that, there is really no limit on the size of JSON data to be send or receive, it's up to the capabilities of the function that you are using.
xScatta Posted June 17, 2016 Author Posted June 17, 2016 @KariiiM, are you sure ? Cause i want to make a table of about 3k vehicles and their data like color, upgrades and other. With one toJSON of whole table of these vehicles. ? It's fine to celebrate success but it is more important to heed the lessons of failure.
DeVo Posted June 17, 2016 Posted June 17, 2016 There's nothing in the wiki that says toJSON function has a size limit, so it probably isn't limited. But I'm afraid that big tables can cause a performance hit especially if you're using the function continuously. Why don't you try and tell us the results? I wrote nothing. Nothing.
xScatta Posted June 17, 2016 Author Posted June 17, 2016 I'm gonna use this only at resource stop, i will try it and tell you how it works. Thanks It's fine to celebrate success but it is more important to heed the lessons of failure.
Moderators AlexTMjugador Posted June 17, 2016 Moderators Posted June 17, 2016 I think there is no hard limit in what can toJSON return (and if it uses char* strings in its C++ implementation, which is probable, I can tell you that there isn't any limit). However, keep in mind that RAM, storage and CPU power are limited resources: if your toJSON call produces a 1 GB string, it will take more than 1 GB in RAM to store it, doing any operations with it will take time and saving it to a database may be impossible or be impractical, depending of the limits of the DB software you are using. When working with large amounts of data the optimal thing to do is dividing it in smaller cunks which can be stored and processed without any problem. My Wiki contributions My MTA: SA Community profile Sapere aude!
KariiiM Posted June 17, 2016 Posted June 17, 2016 What Alex said is true, as I told you there's no limit for JSON at all, but if you stored into it a large amount of data, to be saved into your database for example it will take more RAM memories to be handled, and still JavaScript Object Notation ( JSON ) has no limit specified, it's up to your server RAM too.
xScatta Posted June 18, 2016 Author Posted June 18, 2016 Okay, thanks everyone for help It's fine to celebrate success but it is more important to heed the lessons of failure.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now