pynmea2 icon indicating copy to clipboard operation
pynmea2 copied to clipboard

Extracting data container

Open ptoews opened this issue 5 years ago • 2 comments

Hi, I would like to extract the parsed values together with their field names from the NMEASentence object into a general container, for example into a namedtuple or dictionary. As far as I can see, there is no possibility to do this yet. However, the repr() method does pretty much exactly that, but returns a string instead. Would it be possible to separate the field/data collection and string representation, so that there is an additional method like as_dict() or similar?

ptoews avatar Apr 26 '20 15:04 ptoews

Anything new about this? Otherwise I would be happy to help, and open a PR with the suggested approach. Or are there some special things to consider?

ptoews avatar May 20 '20 13:05 ptoews

This is a good idea. I haven't had much time to work on this project in a while, but I'm open to PRs!

Knio avatar Jun 11 '20 01:06 Knio