Rest API - Underscores in entity name for model

Originally Posted 31 March 2017, 8:25 am EST

  • Originally Posted 31 March 2017, 8:25 am EST

    Greetings, I'm trying to make some post petitions to REST service for adding new entities in my model.

    Some of my entities naming have underscores (_) in it, like "entity_name", but when sending a constructed JSON to the service, that underscore seems to be interpreted like a point (.) as in "entity.name".

    Is there a way to use underscores in their naming?

    Originally, my JSON was constructed by using some methods made in JAVA and to test if this issue arises because of differences between platforms I replicated them in C# but no luck so far .

    (Attached to this post is the mentioned method and result returned from server)

    My current AR Server build is: ActiveReports10Server-v10.2.7127.0

    (Additionally, I've submitted a ticket for this issue but as for now any response of you receiving it has been received)
    2017/03/RESTIssue.txt
  • Reply

    Hello ,

    please change the binding string format to "Binding = string.Format(@"vw\_rh\_{0}\_{1}", report, user),"

    Thanks,
    Sergey Romanov.
  • Reply

    <blockquote><cite>@SergeyRomanov said:</cite>
    Hello ,

    please change the binding string format to "Binding = string.Format(@"vw\_rh\_{0}\_{1}", report, user),"

    Thanks,
    Sergey Romanov.</blockquote>

    Thanks for the answer, I've tried your recommendation but now the service returns an array out of bounds exception (attached to this post).

    To verify if it wasn't an issue with my method, I sent another request to the API but using a table without underscores in its name and worked fine, so it must be another thing.
    2017/04/ModelException.txt
  • Marked as Answer

    Reply

    Hello ,

    in such case, i think you need to add "dbo_" - "Binding = string.Format(@”dbo_vw\_rh\_{0}\_{1}”, report, user),"

    Thanks,
    Sergey Romanov.
  • Reply

    Hi,
    You need to escape the “_” with “\_” in the table name, before sending the Json to the service.
  • Reply

    <blockquote><cite>@SergeyRomanov said:</cite>
    Hello ,

    in such case, i think you need to add "dbo_" - "Binding = string.Format(@”dbo_vw\_rh\_{0}\_{1}”, report, user),"

    Thanks,
    Sergey Romanov.</blockquote>

    This solves the previously found problem and the troubles with the server handling JSON. Thanks.

    (Sorry for delaying my response, there were holidays here in my country and couldn't check this)
  • Reply

    Thanks to the author's very comprehensive description, I was able to completely fix my dilemma after reading this post. I posted my review on the https://resumecompaniesreview.com/, which you may read. Thank you so much for your time and consideration.
  • Reply

    Kup followersy na https://www.followersy.pl/produkt/instagram-obserwujacy/
  • Reply

    Kup obserwacje na https://fameboosters.pl/ lub także https://www.kupobserwujacych.pl/produkt/instagram-follow/.
  • Reply

    Instagram Follower kaufen: https://www.echtefollower.de/produkt/instagram-follower/
  • Reply

    Visit https://www.followersleader.com//
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels