Open Closed

Model JSON properties #1107


User avatar
0
Dicky.tech@gmail.com created

I don't seem to get json property names working.

abp seems to normalise every request response regardless of the json property names. see below sample and how have set my field properties. how can I.get it to work and have my API responses reflect well i.e CityName ? I also want to return 5,000 records per page for this service, the default seems to be 1,000 max.

public class Videogame { [JsonProperty("CityName")] public string City_Name { get; set; } [JsonProperty("ReleaseDate")] public DateTime Release_Date { get; set; } }

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

7 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I.get it to work and have my API responses reflect well i.e CityName ?

    What is your ABP Framework version?

    I also want to return 5,000 records per page for this service, the default seems to be 1,000 max.

    I think you can change this.

    https://github.com/abpframework/abp/blob/3fcdeeeb05810b7a2e162f212ef435b81d412aa5/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs#L25

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Dicky.tech@gmail.com created

    What is your ABP Framework version?

    2.3 am also planning to upgrading to 4.3

    https://github.com/abpframework/abp/blob/3fcdeeeb05810b7a2e162f212ef435b81d412aa5/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs#L25

    Any shortcut to change this without passing through the ABP source code ?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    2.3 am also planning to upgrading to 4.3

    The JsonProperty attribute namespace should belong Newtonsoft.Json, Can you check?

    Any shortcut to change this without passing through the ABP source code ?

    Default value of MaxMaxResultCount will be 1,000. Set LimitedResultRequestDto.MaxMaxResultCount static property to increase it.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Dicky.tech@gmail.com created

    2.3 am also planning to upgrading to 4.3

    The JsonProperty attribute namespace should belong Newtonsoft.Json, Can you check? Yes this belongs to Newtonsoft.json but it doesn't work on abp, seems the abp api generator doesn't recognise property names

    Any shortcut to change this without passing through the ABP source code ?

    Default value of MaxMaxResultCount will be 1,000. Set LimitedResultRequestDto.MaxMaxResultCount static property to increase it. Which specific file in my project can I set this?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    the abp api generator doesn't recognise property names

    It will support in v4.3. https://github.com/abpframework/abp/issues/7776

    Which specific file in my project can I set this?

    This is a static property, you can change it in places, such as Program.cs, Startup.cs

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Dicky.tech@gmail.com created

    Thank you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    Dicky.tech@gmail.com created

    This two works well. thank for the great work.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.