You should actually put that in a try finally block I'd say because if an exception is thrown before you reach the call to the close method the connection will still stay open.

// Json