Skip to content

Commit

Permalink
Update README.md and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Jan 18, 2016
1 parent 64d6a76 commit 8b53ac0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ format that stores data indexed by IP address subnets (IPv4 or IPv6).

## Requirements ##

This library works with .NET Framework version 4.0 and above.

This library also uses [Json.NET](http://json.codeplex.com/).
This library works with .NET Framework version 4.5 and above.

## Installation ##

Expand All @@ -36,9 +34,11 @@ comparable to loading the file into real memory with the `Memory` mode while
using significantly less memory.

To look up an IP address, pass a `string` representing the IP address to the
`Find` method on `Reader`. This method will return the result as a
`Newtonsoft.Json.Linq.JToken`. `JToken` objects are used as they provide a
convenient representation of multi-type data structures.
`Find<T>` method on `Reader`. This method will return the result as type `T`.
`T` may either be a generic collection or a class using the
`[MaxMind.Db.Constructor]` attribute to declare which constructor to use
during deserialization and the `[MaxMind.Db.Parameter("name")]` to map the
database key `name` to a particular constructor parameter.

We recommend reusing the `Reader` object rather than creating a new one for
each lookup. The creation of this object is relatively expensive as it must
Expand All @@ -50,9 +50,8 @@ read in metadata for the file.

using (var reader = new Reader("GeoIP2-City.mmdb"))
{
var response = reader.Find("24.24.24.24");

Console.WriteLine(response.ToString());
var data = reader.Find<Dictionary<string, object>>("24.24.24.24");
...
}
```

Expand Down Expand Up @@ -89,6 +88,6 @@ The MaxMind DB Reader API uses [Semantic Versioning](http://semver.org/).

## Copyright and License ##

This software is Copyright (c) 2015 by MaxMind, Inc.
This software is Copyright (c) 2016 by MaxMind, Inc.

This is free software, licensed under the Apache License, Version 2.0.
10 changes: 10 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release Nodes #

## 2.0.0-beta1 (2016-01-18) ##

* Significant API changes. The `Find` method now takes a type parameter
specifying the type to deserialize to. Note that `JToken` is _not_ supported
for this. You can either deserialize to an arbitrary collection or to
model classes that use the `MaxMind.Db.Constructor` and
`MaxMind.Db.Parameter` attributes to identify the constructors and
parameters to deserialize to.
* The API now significantly faster.

## 1.2.0 (2015-09-23) ##

* Production release. No changes.
Expand Down

0 comments on commit 8b53ac0

Please sign in to comment.