functioning JSON serializer and generalized POST