Skip to content
Feb 11, 2019
Merge branch 'release/0.6.0'
* release/0.6.0:
  README: show version 0.6.0
  build as 0.6.0
  tune travis config
  git ignores
  gradle coordinates
  typos
  update a few dependencies to newer versions
  drop Java 6 Support.

@bpsm bpsm released this Dec 11, 2016 · 10 commits to master since this release

This release:

#47 Can read namespaced maps as per CLJ-1910

Maps written thus      parse as below
-----------------      --------------
  #:foo {              {
     :a     1,            :foo/a 1,
      b     2,             foo/b 2,
      _/c   3,             c     3,
     :_/d   4,            :d     4,
      bar/e 5,             bar/e 5,
     :bar/f 6             :bar/f 6
  }                    }

Symbols or keywords appearing as keys in the map without a namespace receive as a namespace the symbol following #: preceding the map. In this example that symbol is 'foo'. (see the keys :a and b).

Maps so prefixed would lose the ability to contain keys with no namespace unless they provided some mechanism to opt out of this feature. Within namespaced maps the namespace prefix _ will cause the keyword or symbol to be parsed as being without a namespace. (see the keys /c and :/d)

Symbols or keywords which already have a namespace (other than _ as mentioned above) are parsed as they are just as if the map containing them had not been namespaced.

Compatibility note:

Clients that use Scanner directly should be aware that the enum Token has gained a new value:

Token.DEFAULT_NAMESPACE_FOLLOWS

This is emitted by Scanner when "#:" is parsed. It will be followed by a bare symbol naming the default namespace provided the input being scanned is syntactically correct.

#49 Throws an exception when asked to read a map or set with duplicates

An EdnSyntaxException will be thrown when parsing map or set literals to signal the detection of a duplicate key (in a map) or element (in a set). This is accomplished by teaching CollectionBuilder.add() implementations used by default for Maps and Sets to check for duplicates.

Third-party implementations of CollectionBuilder will probably want to implement this check in their own add method as well.

Assets 2
You can’t perform that action at this time.