Skip to content

Commit 8b53ac0

Browse files
committed
Update README.md and release notes
1 parent 64d6a76 commit 8b53ac0

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ format that stores data indexed by IP address subnets (IPv4 or IPv6).
77

88
## Requirements ##
99

10-
This library works with .NET Framework version 4.0 and above.
11-
12-
This library also uses [Json.NET](http://json.codeplex.com/).
10+
This library works with .NET Framework version 4.5 and above.
1311

1412
## Installation ##
1513

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

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

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

5151
using (var reader = new Reader("GeoIP2-City.mmdb"))
5252
{
53-
var response = reader.Find("24.24.24.24");
54-
55-
Console.WriteLine(response.ToString());
53+
var data = reader.Find<Dictionary<string, object>>("24.24.24.24");
54+
...
5655
}
5756
```
5857

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

9089
## Copyright and License ##
9190

92-
This software is Copyright (c) 2015 by MaxMind, Inc.
91+
This software is Copyright (c) 2016 by MaxMind, Inc.
9392

9493
This is free software, licensed under the Apache License, Version 2.0.

releasenotes.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release Nodes #
22

3+
## 2.0.0-beta1 (2016-01-18) ##
4+
5+
* Significant API changes. The `Find` method now takes a type parameter
6+
specifying the type to deserialize to. Note that `JToken` is _not_ supported
7+
for this. You can either deserialize to an arbitrary collection or to
8+
model classes that use the `MaxMind.Db.Constructor` and
9+
`MaxMind.Db.Parameter` attributes to identify the constructors and
10+
parameters to deserialize to.
11+
* The API now significantly faster.
12+
313
## 1.2.0 (2015-09-23) ##
414

515
* Production release. No changes.

0 commit comments

Comments
 (0)