move JSON encoding to splash/resources