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

Ditch gross multiple user records/debugging and use a per-user JSON object #39

Closed
dgets opened this issue Feb 4, 2015 · 4 comments
Closed

Comments

@dgets
Copy link
Owner

dgets commented Feb 4, 2015

This will require a rewrite of dperuser.js. If I continue down the path that I'm going, the code is going to end up horribly cluttering the user directory at some point, and I really don't want that, or relying on a sub-directory (though that may become necessary). At this point, adding these JSON per-user records instead will take care of the data handling for multiple issues:

More on this later.

@dgets dgets self-assigned this Feb 4, 2015
@dgets dgets added this to the Beta features milestone Feb 4, 2015
@dgets
Copy link
Owner Author

dgets commented Feb 4, 2015

Help from Synchronet IRC:

09:17 < khelair> If not I suppose I'll have to do some more google searching on 
                 how to read it in and parse it up
09:17 < khelair> oh
09:17 < khelair> got a pointer to docs at all?
09:17 < larry_lagomorph> JSON.parse(obj)
09:17 < khelair> well that was tough.  heh
09:17 < echicken> JSON.parse(str); JSON.stringify(obj);
09:17 < khelair> does it just create variables in the current scope, then?
09:17 < echicken> it returns a variable
09:17 < khelair> er arrays or objects
09:18 < larry_lagomorph> if you had a var...
09:18 < khelair> yeah
09:18 < khelair> I know...  Just undercaffinated ;)
09:18 < khelair> thanks you guys
09:18 < larry_lagomorph> var strObj = 
                         "{name:"test_object",somethingelse:"poop"}"
09:19 < larry_lagomorph> var obj = JSON.parse(strObject);
09:19 < khelair> roger that
09:19 < larry_lagomorph> console.log(obj.name) //test_object

@dgets
Copy link
Owner Author

dgets commented Feb 7, 2015

See the User and Debugging Records JSON page in order to see where this is going right now.

@dgets
Copy link
Owner Author

dgets commented Feb 9, 2015

Interestingly enough, there was a bug in trying to utilize File.readln(), due to the fact that it only slurps in up to 512 characters by default. wtF-f-f Anyway, I'm going to keep it all one JSON string to parse, since it's already organized as such that way, as per echicken's suggestion, and then just use File.read() or File.readAll() (not really familiar on the differences just yet).

@dgets
Copy link
Owner Author

dgets commented Feb 10, 2015

Handled; working on the rest of the code in issue #41 now.

@dgets dgets closed this as completed Feb 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant