Click here to Skip to main content
15,883,883 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
honey the codewitch24-Dec-20 10:54
mvahoney the codewitch24-Dec-20 10:54 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
PIEBALDconsult24-Dec-20 11:32
mvePIEBALDconsult24-Dec-20 11:32 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
honey the codewitch24-Dec-20 11:45
mvahoney the codewitch24-Dec-20 11:45 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
PIEBALDconsult24-Dec-20 13:17
mvePIEBALDconsult24-Dec-20 13:17 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
honey the codewitch24-Dec-20 13:24
mvahoney the codewitch24-Dec-20 13:24 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
PIEBALDconsult24-Dec-20 14:23
mvePIEBALDconsult24-Dec-20 14:23 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
honey the codewitch24-Dec-20 15:56
mvahoney the codewitch24-Dec-20 15:56 
GeneralRe: Who here knows what a pull parser or pull parsing is? Pin
honey the codewitch24-Dec-20 16:03
mvahoney the codewitch24-Dec-20 16:03 
PIEBALDconsult wrote:
Well, mine too. It does have to tokenize so it knows when it finds something you want it to parse,


I have other ways of finding something. I switch to a fast matching algorithm where I basically look for a quote as if the document were a flat stream of characters and not a hierarchical ordered structure of logical JSON elements. That's what I mean by partial parsing and part of what I mean by denormalized searching/scanning.

It ignores swaths of the document until it finds what you want. For example
C++
reader.skipToField("name",JsonReader::Forward);


This performs the type of flat match that I'm talking about.

C++
reader.skipToField("name",JsonReader::Siblings);


This performs a partially flat and partially structured match, looking for name on this level of the object heirarchy.

C++
reader.skipToField("name",JsonReader::Descendants);


This does a nearly flat match, but basically counts '{' and '}' so it knows when to stop searching.

I've simplified the explanation of what I've done, but that's the gist. I also don't load strings into memory at all when comparing them. I compare one character at a time straight off the "disk" so I never know the whole field name unless it's the one I'm after.
Real programmers use butterflies

AnswerRe: Who here knows what a pull parser or pull parsing is? Pin
User 1493685330-Dec-20 10:25
User 1493685330-Dec-20 10:25 
JokeI'm isolating over Christmas, so... Pin
DerekT-P22-Dec-20 10:23
professionalDerekT-P22-Dec-20 10:23 
GeneralRe: I'm isolating over Christmas, so... Pin
DRHuff22-Dec-20 11:18
DRHuff22-Dec-20 11:18 
GeneralRe: I'm isolating over Christmas, so... Pin
Joe Woodbury22-Dec-20 11:28
professionalJoe Woodbury22-Dec-20 11:28 
GeneralDid I fall asleep for a few months, and it's April 1st? Pin
OriginalGriff22-Dec-20 10:18
mveOriginalGriff22-Dec-20 10:18 
GeneralRe: Did I fall asleep for a few months, and it's April 1st? Pin
DerekT-P22-Dec-20 10:25
professionalDerekT-P22-Dec-20 10:25 
GeneralRe: Did I fall asleep for a few months, and it's April 1st? Pin
OriginalGriff22-Dec-20 10:26
mveOriginalGriff22-Dec-20 10:26 
GeneralRe: Did I fall asleep for a few months, and it's April 1st? Pin
RickZeeland22-Dec-20 19:36
mveRickZeeland22-Dec-20 19:36 
GeneralRe: Did I fall asleep for a few months, and it's April 1st? Pin
Mike Hankey23-Dec-20 2:10
mveMike Hankey23-Dec-20 2:10 
GeneralRe: Did I fall asleep for a few months, and it's April 1st? Pin
dandy7223-Dec-20 5:35
dandy7223-Dec-20 5:35 
GeneralThought of the Day PinPopular
OriginalGriff22-Dec-20 4:35
mveOriginalGriff22-Dec-20 4:35 
GeneralRe: Thought of the Day Pin
W Balboos, GHB22-Dec-20 5:01
W Balboos, GHB22-Dec-20 5:01 
GeneralRe: Thought of the Day Pin
jeron122-Dec-20 5:14
jeron122-Dec-20 5:14 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer22-Dec-20 7:25
professionalDaniel Pfeffer22-Dec-20 7:25 
GeneralRe: Thought of the Day Pin
dandy7222-Dec-20 9:52
dandy7222-Dec-20 9:52 
GeneralRe: Thought of the Day Pin
Johnny J.22-Dec-20 20:56
professionalJohnny J.22-Dec-20 20:56 
GeneralRe: Thought of the Day Pin
DRHuff22-Dec-20 11:13
DRHuff22-Dec-20 11:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.