Create a Json view of the user, with the format of the user/login response I'm in Drupal 8. 
After activating the module rest, and try and receive a response from the route /user/login?_format=json I get this: 

{
    "current_user": {
        "uid": "4",
        "name": "cravushedal"
    },
    "csrf_token": "49TlM-VLnQcErR1W5vW7losJPLHXPpqE2UpLh9_bZzg",
    "logout_token": "fkBNWh8iLoTbXPO4Elha86PVe_0I8L1JKIxXQ2KemMo"
}


Now I want to craete a view with all the users, but something like this: 

{
    "current_user": {
        "uid": "3",
        "name": "blablabla"
    }     
}
{
    "current_user": {
        "uid": "4",
        "name": "cravushedal"
    }     
}


In my rest view, I have the name, uid, and a Global custom text. The name and the uid are hidden, and I am calling both fields in the global custom text. 
This is my result: 

[{"current_user":"1josue"},{"current_user":"2slucuthivili"}]


It doesnt recognize the label, so I had try to include them manually, but the json add \n or \what ever and that destroy my json. 

Any idea about how can I achieve this?? thanks!
When you query /user/login it defaults to currently logged-in user.

I suppose you need to create a view with a "REST export" display. The view defaults to "Entity" row style, change it to "Fields".



In "Fields" settings, you can rename the labels that are output in "Alias" fields:



In this "REST Export" view you will have set a path. i.e. /rest/people

Querying /rest/people?_format=json should output something like this:

[
  {
    "user_name": "admin",
    "user_id": "1",
    "user_customtext": "Custom text"
  },
  ...
]


You can use the Global - Custom text field to concat multiple fields as tokens, then hide those fields from being displayed: