Add closure example and json example with their tests