[aprssig] APRS device identifiers (tocalls) in YAML, XML and JSON

Heikki Hannikainen hessu at hes.iki.fi
Thu Oct 24 01:43:07 CDT 2013


On Thu, Oct 24, 2013 at 4:51 AM, Lynn W. Deffenbaugh (Mr)
<ldeffenb at homeside.to> wrote:
> My big reservation with regular expressions is that there seems to be
> multiple dialects of regular expression languages.

There are two main variants. POSIX and Perl-compatible (pcre, has
extensions). POSIX is an IEEE standard, so it's sort of written in
stone. Well, maybe in a really thick and heavy book or binder. :)
Widely understood & implemented.  Basic POSIX regexps (BRE) would
probably be good and enough for our use.

http://en.wikipedia.org/wiki/Regular_expression#Standards

* and ? are "sort of standard" glob matches, but the nnn extension is
now really a custom thing for us, and there would be a widely
implemented standard to use as an alternative. I would prefer taking a
regexp library (pcre) and just throw the tocall spec found in the
database file at it, instead of writing my own converters, since
writing custom converters takes time and effort and may introduce
bugs. String matching is sooooo a solved problem already. :)

> Can we also add an Item-In-Message flag per
> http://www.aprs.org/aprs12/item-in-msg.txt?

Sure. I turned the flag to an array of feature identifiers. YAML source:

 - tocall: APWM??
   vendor: KJ4ERJ
   model: APRSISCE
   class: software
   os: Windows Mobile
   features:
     - messaging
     - item-in-msg

which translates to JSON:

      "APWM??" : {
         "model" : "APRSISCE",
         "class" : "software",
         "os" : "Windows Mobile",
         "vendor" : "KJ4ERJ",
         "features" : [
            "messaging",
            "item-in-msg"
         ]
     },


and XML:

<tocall id="APWM??">
  <model>APRSISCE</model>
  <class>software</class>
  <os>Windows Mobile</os>
  <vendor>KJ4ERJ</vendor>
  <features>
     <feature id="messaging" />
     <feature id="item-in-msg" />
  </features>
</tocall>

Maybe it's now obvious why I prefer to have the master copy in YAML.
If not, try typing each of those by hand once. :)

- Hessu


More information about the aprssig mailing list